50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
volumes:
|
|
- ./frontend/conf/nginx.conf:/etc/nginx/nginx.conf
|
|
- ./frontend/logs/nginx:/etc/nginx/logs
|
|
- ./frontend/cert:/etc/nginx/cert
|
|
networks:
|
|
- net
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- server
|
|
|
|
server:
|
|
container_name: server
|
|
build: frontend/backend
|
|
command: python -m flask run
|
|
ports:
|
|
- "4200:4200"
|
|
volumes:
|
|
- ./frontend/backend:/data/frontend/backend
|
|
- ./frontend/app.py:/data/frontend/app.py
|
|
- ./frontend/config.py:/data/frontend/config.py
|
|
environment:
|
|
- FLASK_APP=app.py
|
|
- FLASK_ENV=production
|
|
- FLASK_DEBUG=1
|
|
- FLASK_RUN_PORT=4200
|
|
- PYTHONUNBUFFERED=1
|
|
networks:
|
|
- net
|
|
depends_on:
|
|
- frontend
|
|
|
|
frontend:
|
|
container_name: frontend
|
|
build: frontend
|
|
command: npm run build
|
|
volumes:
|
|
- ./frontend/src:/data/frontend
|
|
- ./frontend/node_modules:/data/frontend/node_modules
|
|
environment:
|
|
- NODE_ENV=production
|
|
|
|
networks:
|
|
net:
|
|
driver: bridge
|