Skip to content

Commit 0a9f9c8

Browse files
author
hubert
committed
chore: add table prefix in env & change nginx config
1 parent 5d15006 commit 0a9f9c8

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

docker-compose.deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ services:
2727
- REDIS_URL=${REDIS_URL:-redis://host:port/db}
2828
- INFRASTRUCTURE_DATABASE_CONNECTION=${INFRASTRUCTURE_DATABASE_CONNECTION:-mysql://user:password@host:port/database}
2929
- IDENTITY_DATABASE_CONNECTION=${IDENTITY_DATABASE_CONNECTION:-mysql://user:password@host:port/database}
30+
- TABLE_PREFIX=${TABLE_PREFIX:-po_}
3031
volumes:
3132
- ${PWD}/conf:/app/conf
3233
- ${PWD}/uploads:/app/content/uploads

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ services:
4646
- REDIS_URL=${REDIS_URL:-redis://host:port/db}
4747
- INFRASTRUCTURE_DATABASE_CONNECTION=${INFRASTRUCTURE_DATABASE_CONNECTION:-mysql://user:password@host:port/database}
4848
- IDENTITY_DATABASE_CONNECTION=${IDENTITY_DATABASE_CONNECTION:-mysql://user:password@host:port/database}
49+
- TABLE_PREFIX=${TABLE_PREFIX:-po_}
4950
volumes:
5051
- conf:/app/conf
5152
- ${PWD}/uploads:/app/content/uploads

nginx.conf

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
server 127.0.0.1:9080;
55
}
66

7+
upstream pomelo_infrastructure_bff {
8+
server 127.0.0.1:3002;
9+
}
10+
711
upstream pomelo_identity_server {
812
server 127.0.0.1:3003;
913
}
@@ -56,7 +60,7 @@
5660
proxy_set_header X-Forwarded-Proto $scheme;
5761
}
5862

59-
location ~* /(action/uploads|languages)/(.*) {
63+
location /action/ {
6064
proxy_read_timeout 90;
6165
proxy_connect_timeout 90;
6266
proxy_redirect off;
@@ -66,6 +70,18 @@
6670
proxy_set_header X-Real-IP $remote_addr;
6771
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6872
proxy_set_header X-Forwarded-Proto $scheme;
73+
}
74+
75+
location ~* /(uploads|languages)/(.*) {
76+
proxy_read_timeout 90;
77+
proxy_connect_timeout 90;
78+
proxy_redirect off;
79+
proxy_pass http://pomelo_infrastructure_bff/$1/$2$is_args$args;
80+
81+
proxy_set_header Host $http_host;
82+
proxy_set_header X-Real-IP $remote_addr;
83+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
84+
proxy_set_header X-Forwarded-Proto $scheme;
6985

7086
client_max_body_size 100M;
7187
}

0 commit comments

Comments
 (0)