Update: save Docker nginx Angular Node Flask
This commit is contained in:
parent
1a3bee1846
commit
fcedd7534c
16 changed files with 89 additions and 84 deletions
45
frontend/docker-compose.yml
Normal file
45
frontend/docker-compose.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
volumes:
|
||||
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./logs/nginx:/etc/nginx/logs
|
||||
- ./cert:/etc/nginx/cert
|
||||
networks:
|
||||
- net
|
||||
ports:
|
||||
- 80:80
|
||||
depends_on:
|
||||
- frontend
|
||||
|
||||
flask-frontend:
|
||||
container_name: flask-frontend
|
||||
build: backend
|
||||
command: python -m flask run
|
||||
volumes:
|
||||
- ./backend:/data/backend
|
||||
environment:
|
||||
- FLASK_APP=app.py
|
||||
- FLASK_ENV=development
|
||||
- FLASK_DEBUG=0
|
||||
- FLASK_RUN_PORT=5000
|
||||
depends_on:
|
||||
- frontend
|
||||
|
||||
frontend:
|
||||
container_name: frontend
|
||||
build: .
|
||||
command: npm start
|
||||
volumes:
|
||||
- ./src:/data/frontend
|
||||
- ./node_modules:/data/frontend/node_modules
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
networks:
|
||||
- net
|
||||
|
||||
networks:
|
||||
net:
|
||||
driver: bridge
|
||||
Loading…
Add table
Add a link
Reference in a new issue