version: "3.7"
services:
mycodo_influxdb:
container_name: mycodo_influxdb
build:
context: ../
dockerfile: docker/influxdb/Dockerfile
env_file:
- 'influxdb/env.influxdb'
volumes:
- mycodo_influxdb:/var/lib/influxdb
mycodo_nginx:
container_name: mycodo_nginx
restart: always
build:
context: ../
dockerfile: docker/nginx/Dockerfile
volumes:
- mycodo:/usr/local/mycodo
- mycodo_log:/var/log/mycodo
- mycodo_ssl_certs:/home/mycodo/mycodo/mycodo_flask/ssl_certs
ports:
- "80:80"
- "443:443"
depends_on:
- mycodo_flask
mycodo_daemon:
container_name: mycodo_daemon
image: app
restart: always
environment:
- TZ=America/New_York
volumes:
- mycodo:/usr/local/mycodo
- mycodo_env:/home/mycodo/env
- mycodo_databases:/home/mycodo/databases
- mycodo_cameras:/home/mycodo/cameras
- mycodo_custom_functions:/home/mycodo/mycodo/functions/custom_functions
- mycodo_custom_actions:/home/mycodo/mycodo/actions/custom_actions
- mycodo_custom_inputs:/home/mycodo/mycodo/inputs/custom_inputs
- mycodo_custom_outputs:/home/mycodo/mycodo/outputs/custom_outputs
- mycodo_custom_widgets:/home/mycodo/mycodo/widgets/custom_widgets
- mycodo_custom_user_scripts:/home/mycodo/mycodo/user_scripts
- mycodo_log:/var/log/mycodo
- mycodo_ssl_certs:/home/mycodo/mycodo/mycodo_flask/ssl_certs
- /dev:/dev
- /sys:/sys
- /opt:/opt
privileged: true
command: bash -c "wget --quiet --no-check-certificate -p http://mycodo_nginx/ -O /dev/null &&
PYTHONPATH=/home/mycodo /home/mycodo/env/bin/python mycodo_daemon.py"
depends_on:
- mycodo_flask
mycodo_flask:
container_name: mycodo_flask
image: app
hostname: Mycodo
build:
context: ../
dockerfile: docker/Dockerfile
restart: always
environment:
- TZ=America/New_York
volumes:
- mycodo:/usr/local/mycodo
- mycodo_env:/home/mycodo/env
- mycodo_databases:/home/mycodo/databases
- mycodo_cameras:/home/mycodo/cameras
- mycodo_custom_functions:/home/mycodo/mycodo/functions/custom_functions
- mycodo_custom_actions:/home/mycodo/mycodo/actions/custom_actions
- mycodo_custom_inputs:/home/mycodo/mycodo/inputs/custom_inputs
- mycodo_custom_outputs:/home/mycodo/mycodo/outputs/custom_outputs
- mycodo_custom_widgets:/home/mycodo/mycodo/widgets/custom_widgets
- mycodo_custom_user_scripts:/home/mycodo/mycodo/user_scripts
- mycodo_custom_user_css:/home/mycodo/mycodo/mycodo_flask/static/css/user_css
- mycodo_custom_user_js:/home/mycodo/mycodo/mycodo_flask/static/js/user_js
- mycodo_custom_user_fonts:/home/mycodo/mycodo/mycodo_flask/static/fonts/user_fonts
- mycodo_log:/var/log/mycodo
- mycodo_ssl_certs:/home/mycodo/mycodo/mycodo_flask/ssl_certs
- mycodo_influxdb:/var/lib/influxdb
- /dev:/dev
- /var/run/docker.sock:/var/run/docker.sock:ro
privileged: true
command: /home/mycodo/env/bin/python -m gunicorn --workers 1 --bind unix:/usr/local/mycodo/mycodoflask.sock start_flask_ui:app
depends_on:
- mycodo_influxdb
volumes:
mycodo:
mycodo_env:
mycodo_cameras:
mycodo_custom_functions:
mycodo_custom_actions:
mycodo_custom_inputs:
mycodo_custom_outputs:
mycodo_custom_widgets:
mycodo_custom_user_scripts:
mycodo_custom_user_css:
mycodo_custom_user_js:
mycodo_custom_user_fonts:
mycodo_databases:
mycodo_ssl_certs:
mycodo_log:
mycodo_influxdb:
mycodo_grafana: