代码拉取完成,页面将自动刷新
version: '2.2'
services:
db:
container_name: monitor-db
image: mysql:5.7
#command: --default-authentication-plugin=mysql_native_password --init-file /code/files/init.sql
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_USER: dba
MYSQL_PASSWORD: 123456
MYSQL_DATABASE: monitor
DJANGO_SETTINGS_MODULE: web.travis_settings
volumes:
- .:/code
- monitor_db_data_volume:/var/lib/mysql
security_opt:
- seccomp:unconfined
ports:
- "3306:3306" # same for localhost dev
healthcheck:
test: "/usr/bin/mysql --user=dba --password=123456 --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 20s
retries: 50
api: # django App
container_name: monitor-web
build:
context: ./files/images/
dockerfile: Dockerfile
#args:
#- http_proxy=http://192.168.2.197:8124
#- https_proxy=http://192.168.2.197:8124
image: monitor-pass-web:2.0
command: python3 ./monitor_web/manage.py runserver 0.0.0.0:8000 --insecure
restart: always
volumes:
- .:/code
- /services/logs/monitor_web/:/services/logs/
ports:
- "8000:8000" # Expose API port
depends_on:
db:
condition: service_healthy
links:
- db:mydb
adminer:
container_name: monitor-pass-adminer
image: adminer
restart: always
ports:
- 8087:8080
depends_on:
db:
condition: service_healthy
frontend: # Nginx Server For Frontend App
container_name: monitor-front
image: nginx
restart: always
volumes:
- ./monitor_front/:/usr/share/nginx/html
- ./files/default.conf:/etc/nginx/conf.d/default.conf # proxy api 8000 to 80 port
ports:
- "80:80" # Forward site to localhost:80
depends_on:
- api
ui:
container_name: monitor-ui
build:
context: ./monitor_ui/
dockerfile: ui.Dockerfile
image: monitor-pass-ui:2.0
volumes:
- ./monitor_ui/:/code
# mount node_modules as a workaround for it disappearing
# after adding /client as a mounted folder
- /code/node_modules
command: npm run dev
restart: always
ports:
- "9528:9528"
grafana:
container_name: grafana
image: grafana/grafana:6.7.3
restart: always
ports:
- "3000:3000"
volumes:
monitor_db_data_volume:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。