2021-04-14 10:29:46 +00:00
|
|
|
version: "3.2"
|
2021-02-16 03:40:22 +00:00
|
|
|
|
|
|
|
services:
|
2022-05-10 11:41:39 +00:00
|
|
|
# ssl nginx proxy
|
2021-02-16 03:40:22 +00:00
|
|
|
nginx-proxy:
|
2022-05-10 11:41:39 +00:00
|
|
|
image: nginxproxy/nginx-proxy
|
2021-02-16 03:40:22 +00:00
|
|
|
container_name: nginx-proxy
|
2022-12-26 11:50:07 +00:00
|
|
|
restart: always
|
2021-02-16 03:40:22 +00:00
|
|
|
ports:
|
2022-05-10 11:41:39 +00:00
|
|
|
- 80:80
|
|
|
|
- 443:443
|
2021-02-16 03:40:22 +00:00
|
|
|
volumes:
|
2022-05-10 11:41:39 +00:00
|
|
|
- ./volume/nginx-proxy/certs:/etc/nginx/certs
|
2021-02-16 03:40:22 +00:00
|
|
|
- ./volume/nginx-proxy/vhost:/etc/nginx/vhost.d
|
2022-05-10 11:41:39 +00:00
|
|
|
- ./volume/nginx-proxy/html:/usr/share/nginx/html
|
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
|
|
nginx-proxy-acme:
|
|
|
|
image: nginxproxy/acme-companion
|
|
|
|
container_name: nginx-proxy-acme
|
2022-12-26 11:50:07 +00:00
|
|
|
restart: always
|
2022-05-10 11:41:39 +00:00
|
|
|
volumes:
|
2021-02-16 03:40:22 +00:00
|
|
|
- ./volume/nginx-proxy/certs:/etc/nginx/certs
|
2022-05-10 11:41:39 +00:00
|
|
|
- ./volume/nginx-proxy/vhost:/etc/nginx/vhost.d
|
|
|
|
- ./volume/nginx-proxy/html:/usr/share/nginx/html
|
|
|
|
- ./volume/nginx-proxy/acme:/etc/acme.sh
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
environment:
|
|
|
|
- NGINX_PROXY_CONTAINER=nginx-proxy
|
2021-02-16 03:40:22 +00:00
|
|
|
# backend flask
|
|
|
|
flask:
|
2022-12-26 11:37:43 +00:00
|
|
|
build: ./web
|
2021-02-16 03:40:22 +00:00
|
|
|
container_name: flask
|
|
|
|
restart: always
|
2021-02-22 03:33:24 +00:00
|
|
|
volumes:
|
2021-07-07 12:08:46 +00:00
|
|
|
- ./volume/flask/dyn:/app/static/dyn
|
2021-02-16 03:40:22 +00:00
|
|
|
environment:
|
2021-07-07 12:08:46 +00:00
|
|
|
- APP_NAME=FlaskAqi
|
2021-02-16 03:40:22 +00:00
|
|
|
- TZ=Asia/Bangkok
|
2022-09-19 13:47:48 +00:00
|
|
|
# - MAINTENANCE=True
|
2021-02-16 03:40:22 +00:00
|
|
|
expose:
|
|
|
|
- "8080"
|
2021-07-07 12:08:46 +00:00
|
|
|
# nginx infront of uwsgi
|
2021-02-16 03:40:22 +00:00
|
|
|
nginx:
|
2021-07-07 12:08:46 +00:00
|
|
|
build: ./nginx
|
2021-02-16 03:40:22 +00:00
|
|
|
container_name: backend_nginx
|
|
|
|
restart: always
|
|
|
|
environment:
|
2021-07-07 12:08:46 +00:00
|
|
|
- VIRTUAL_HOST=www.lpb-air.com,lpb-air.com
|
|
|
|
- LETSENCRYPT_HOST=www.lpb-air.com,lpb-air.com
|
2021-02-16 03:40:22 +00:00
|
|
|
expose:
|
|
|
|
- "80"
|
2021-07-07 12:08:46 +00:00
|
|
|
depends_on:
|
|
|
|
- flask
|
2021-02-16 10:57:25 +00:00
|
|
|
# backend postgres
|
|
|
|
postgres:
|
2022-05-10 11:34:49 +00:00
|
|
|
image: postgres:14
|
2021-02-16 10:57:25 +00:00
|
|
|
container_name: postgres
|
|
|
|
restart: always
|
|
|
|
volumes:
|
2022-05-10 11:34:49 +00:00
|
|
|
- ./volume/postgres14:/var/lib/postgresql/data/
|
2021-02-16 10:57:25 +00:00
|
|
|
env_file:
|
|
|
|
- ./env/postgres.env
|
|
|
|
expose:
|
|
|
|
- "5432"
|
2022-05-10 12:02:32 +00:00
|
|
|
# umami stats
|
|
|
|
umami:
|
2022-12-26 11:37:43 +00:00
|
|
|
image: docker.umami.dev/umami-software/umami:postgresql-latest
|
2022-05-10 12:02:32 +00:00
|
|
|
container_name: umami
|
|
|
|
expose:
|
|
|
|
- "3000"
|
|
|
|
env_file:
|
|
|
|
- ./env/umami.env
|
|
|
|
environment:
|
|
|
|
- VIRTUAL_HOST=www.stats.lpb-air.com
|
|
|
|
- LETSENCRYPT_HOST=www.stats.lpb-air.com
|
|
|
|
depends_on:
|
|
|
|
- umami-db
|
|
|
|
restart: always
|
|
|
|
umami-db:
|
|
|
|
image: postgres:14
|
|
|
|
container_name: umami-db
|
|
|
|
env_file:
|
|
|
|
- ./env/umami.env
|
|
|
|
volumes:
|
|
|
|
- ./volume/umami/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro
|
|
|
|
- ./volume/umami/db:/var/lib/postgresql/data
|
|
|
|
restart: always
|