dsql-admin/dsql-app/docker-compose.yml

160 lines
4.8 KiB
YAML
Raw Normal View History

2025-02-16 16:12:40 +00:00
name: dsql
2024-11-05 11:12:42 +00:00
services:
setup:
build:
2025-01-13 08:00:21 +00:00
context: ./docker/setup
dockerfile: Dockerfile
2024-11-05 11:12:42 +00:00
env_file: .env
2025-02-16 16:12:40 +00:00
container_name: dsql-setup
hostname: dsql-setup
2024-11-05 11:12:42 +00:00
volumes:
2025-01-13 08:00:21 +00:00
- .:/app
2024-11-05 11:12:42 +00:00
- ${DSQL_VOLUME_DB_SSL:-../dsql-data/ssl}:/ssl
2024-12-05 07:03:33 +00:00
- ${DSQL_VOLUME_SSH:-../dsql-data/ssh}:/ssh
2025-02-12 16:56:44 +00:00
environment:
- DSQL_SSL_DIR=/app/ssl
- DSQL_DB_SCHEMA_DIR=/app/jsonData/dbSchemas
- DSQL_APP_DIR=/app
2024-11-06 12:57:20 +00:00
2025-02-16 16:12:40 +00:00
cron:
build:
context: ./docker/cron
dockerfile: Dockerfile
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.27
container_name: dsql-cron
hostname: dsql-cron
volumes:
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
- ${DSQL_VOLUME_APP:-.}:/app
environment:
- DSQL_SSL_DIR=/app/ssl
- DSQL_DB_SCHEMA_DIR=/app/jsonData/dbSchemas
- DSQL_APP_DIR=/app
restart: on-failure:${DSQL_WEB_APP_FAIL_COUNTS:-3}
depends_on:
setup:
condition: service_completed_successfully
db:
condition: service_started
reverse-proxy:
image: nginx:alpine
env_file: .env
depends_on:
setup:
condition: service_completed_successfully
networks:
datasquirel:
ipv4_address: 172.72.0.34
container_name: dsql-reverse-proxy
ports:
- ${DSQL_PORT:-7070}:80
restart: always
volumes:
- ./docker/reverse-proxy/conf.d:/etc/nginx/conf.d
2024-11-05 11:12:42 +00:00
webapp:
build:
context: .
dockerfile: ${DSQL_DOCKERFILE:-Dockerfile}
env_file: .env
networks:
datasquirel:
2025-02-16 16:12:40 +00:00
ipv4_address: 172.72.0.35
container_name: dsql-site
hostname: dsql-site
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
- ${DSQL_VOLUME_APP:-.}:/app
2024-11-06 12:57:20 +00:00
environment:
- DSQL_SSL_DIR=/app/ssl
2025-02-12 16:56:44 +00:00
- DSQL_DB_SCHEMA_DIR=/app/jsonData/dbSchemas
- DSQL_APP_DIR=/app
2025-01-13 21:25:20 +00:00
restart: on-failure:${DSQL_WEB_APP_FAIL_COUNTS:-1}
2025-01-13 08:00:21 +00:00
depends_on:
setup:
condition: service_completed_successfully
db:
condition: service_started
2024-11-05 11:12:42 +00:00
2025-02-16 16:12:40 +00:00
websocket:
build:
context: ./docker/web-socket
dockerfile: Dockerfile
2024-11-05 11:12:42 +00:00
env_file: .env
2025-02-16 16:12:40 +00:00
container_name: dsql-websocket
hostname: dsql-websocket
volumes:
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
- ${DSQL_VOLUME_APP:-.}:/app
2024-11-05 11:12:42 +00:00
networks:
datasquirel:
2025-02-16 16:12:40 +00:00
ipv4_address: 172.72.0.36
depends_on:
reverse-proxy:
condition: service_started
restart: always
environment:
- DSQL_SSL_DIR=/app/ssl
- DSQL_DB_SCHEMA_DIR=/app/jsonData/dbSchemas
- DSQL_APP_DIR=/app
static:
image: nginx:alpine
env_file: .env
container_name: dsql-static
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
2025-01-13 08:00:21 +00:00
- ./docker/static/conf.d:/etc/nginx/conf.d
2024-11-05 11:12:42 +00:00
ports:
- ${DSQL_STATIC_SERVER_PORT}:80
2024-11-26 09:31:39 +00:00
restart: always
2025-02-12 16:56:44 +00:00
user: root
2024-11-26 09:31:39 +00:00
2024-11-05 11:12:42 +00:00
db:
2025-02-16 16:12:40 +00:00
image: mariadb:11-jammy
2024-11-05 11:12:42 +00:00
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.32
depends_on:
setup:
condition: service_completed_successfully
2025-02-16 16:12:40 +00:00
container_name: dsql-site-database
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_DB:-../dsql-data/db}:/var/lib/mysql
- ${DSQL_VOLUME_DB_SSL:-../dsql-data/ssl}:/ssl
2025-01-13 08:00:21 +00:00
- ./docker/mariadb/master/conf.d:/etc/mysql/conf.d
2025-02-12 16:56:44 +00:00
- ./docker/mariadb/.bash_history:/root/.bash_history
2024-11-05 11:12:42 +00:00
environment:
2024-11-26 09:31:39 +00:00
- MARIADB_ROOT_PASSWORD=${DSQL_MARIADB_ROOT_PASSWORD:-password}
2025-01-13 08:00:21 +00:00
restart: always
2024-12-05 07:03:33 +00:00
db-load-balancer:
image: nginx:alpine
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.24
depends_on:
db:
condition: service_started
2025-02-16 16:12:40 +00:00
container_name: dsql-db-load-balancer
hostname: dsql-db-load-balancer
2024-12-05 07:03:33 +00:00
volumes:
- ${DSQL_DB_LOAD_BALANCER_CONFIGURATION_FILE:-../dsql-data/db-load-balancer-config/nginx.conf}:/etc/nginx/nginx.conf
2024-11-05 11:12:42 +00:00
ports:
2024-11-26 09:31:39 +00:00
- ${DSQL_DB_EXPOSED_PORT:-33600}:3306
restart: always
2024-11-05 11:12:42 +00:00
networks:
datasquirel:
driver: bridge
ipam:
config:
2025-02-12 16:56:44 +00:00
- subnet: 172.72.0.0/24
2024-11-05 11:12:42 +00:00
gateway: 172.72.0.1