voilàvoilà
This commit is contained in:
parent
40cf1c239a
commit
4dc87f579c
3 changed files with 15 additions and 19 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', 'http://10.1.5.10', 'http://10.1.1.10:4200', 'http://10.1.5.10:4200']
|
origin = ['http://10.1.1.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,8 +22,6 @@ 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:
|
||||||
|
|
@ -40,8 +38,6 @@ 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:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
debutUrl: 'http://10.1.1.10:5000/api/'
|
debutUrl: 'http://10.1.1.10/api/'
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue