aled
This commit is contained in:
parent
4cd8c65524
commit
2930780766
2 changed files with 18 additions and 14 deletions
|
|
@ -7,7 +7,7 @@ def create_app(flask_env='development'):
|
||||||
app = Flask(__name__, instance_relative_config=False, static_url_path='')
|
app = Flask(__name__, instance_relative_config=False, static_url_path='')
|
||||||
origin = app.config.get('ALLOW_ORIGIN')
|
origin = app.config.get('ALLOW_ORIGIN')
|
||||||
if origin is None:
|
if origin is None:
|
||||||
origin = ['http://10.1.1.10']
|
origin = ['http://10.1.5.10']
|
||||||
CORS(app, supports_credentials=True, origins=origin)
|
CORS(app, supports_credentials=True, origins=origin)
|
||||||
if flask_env == 'production':
|
if flask_env == 'production':
|
||||||
app.config.from_object("config.ProductionConfig")
|
app.config.from_object("config.ProductionConfig")
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx-front:
|
# nginx-front:
|
||||||
image: nginx:latest
|
# image: nginx:latest
|
||||||
volumes:
|
# volumes:
|
||||||
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
# - ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./logs/nginx:/etc/nginx/logs
|
# - ./logs/nginx:/etc/nginx/logs
|
||||||
- ./cert:/etc/nginx/cert
|
# - ./cert:/etc/nginx/cert
|
||||||
networks:
|
# networks:
|
||||||
- net
|
# - net
|
||||||
ports:
|
# ports:
|
||||||
- 80:80
|
# - 80:80
|
||||||
depends_on:
|
# depends_on:
|
||||||
- frontend
|
# - frontend
|
||||||
- flask-frontend
|
# - flask-frontend
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
container_name: frontend
|
container_name: frontend
|
||||||
|
|
@ -22,6 +22,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./src:/data/frontend
|
- ./src:/data/frontend
|
||||||
- ./node_modules:/data/frontend/node_modules
|
- ./node_modules:/data/frontend/node_modules
|
||||||
|
ports:
|
||||||
|
- "4200:4200"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
networks:
|
networks:
|
||||||
|
|
@ -38,6 +40,8 @@ services:
|
||||||
- FLASK_ENV=production
|
- FLASK_ENV=production
|
||||||
- FLASK_DEBUG=0
|
- FLASK_DEBUG=0
|
||||||
- FLASK_RUN_PORT=5000
|
- FLASK_RUN_PORT=5000
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue