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='')
|
||||
origin = app.config.get('ALLOW_ORIGIN')
|
||||
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)
|
||||
if flask_env == 'production':
|
||||
app.config.from_object("config.ProductionConfig")
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
# nginx-front:
|
||||
# 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
|
||||
nginx-front:
|
||||
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
|
||||
|
||||
frontend:
|
||||
container_name: frontend
|
||||
|
|
@ -22,8 +22,6 @@ services:
|
|||
volumes:
|
||||
- ./src:/data/frontend
|
||||
- ./node_modules:/data/frontend/node_modules
|
||||
ports:
|
||||
- "4200:4200"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
networks:
|
||||
|
|
@ -40,8 +38,6 @@ services:
|
|||
- FLASK_ENV=production
|
||||
- FLASK_DEBUG=0
|
||||
- FLASK_RUN_PORT=5000
|
||||
ports:
|
||||
- "5000:5000"
|
||||
networks:
|
||||
- net
|
||||
depends_on:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export const environment = {
|
||||
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