Revize 220bfa94
Přidáno uživatelem Michal Schwob před téměř 3 roky(ů)
backend/docker-compose.yml | ||
---|---|---|
19 | 19 |
app: # Spring boot application |
20 | 20 |
build: . |
21 | 21 |
container_name: app-backend # name of the container |
22 |
image: schwobik/backend-app:1.0 |
|
22 | 23 |
ports: |
23 |
- "8000:8000" # expose port 8080 out of the docker container do the local machine
|
|
24 |
- "8080:8080" # expose port 8080 out of the docker container do the local machine
|
|
24 | 25 |
depends_on: |
25 | 26 |
- db |
26 | 27 |
environment: |
... | ... | |
32 | 33 |
container_name: frontend |
33 | 34 |
image: schwobik/frontend-app:1.0 |
34 | 35 |
ports: |
35 |
- "8080:8080"
|
|
36 |
- "80:80"
|
|
36 | 37 |
|
37 | 38 |
volumes: |
38 | 39 |
db-data: |
frontend/nginx/nginx.conf | ||
---|---|---|
1 | 1 |
server { |
2 |
listen 8080; |
|
2 |
listen 80 default_server; |
|
3 |
listen [::]:80 default_server; |
|
3 | 4 |
|
4 | 5 |
root /usr/share/nginx/html; |
5 | 6 |
|
6 |
location /api { |
|
7 |
client_max_body_size 10m; |
|
8 |
proxy_pass http://app:8080/; |
|
7 |
location / { |
|
8 |
root /usr/share/nginx/html; |
|
9 |
index index.html index.htm; |
|
10 |
try_files $uri $uri/ /index.html; |
|
11 |
} |
|
12 |
|
|
13 |
location /api/ { |
|
14 |
proxy_pass http://backend:8080; |
|
15 |
proxy_http_version 1.1; |
|
16 |
proxy_set_header Upgrade $http_upgrade; |
|
17 |
proxy_set_header Connection 'upgrade'; |
|
18 |
proxy_set_header Host $host; |
|
19 |
proxy_cache_bypass $http_upgrade; |
|
9 | 20 |
} |
10 | 21 |
} |
Také k dispozici: Unified diff
Changed config for docker compose
re #9333