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

93 lines
3.1 KiB
YAML
Raw Normal View History

2024-12-06 13:24:26 +00:00
name: ${DSQL_DEPLOYMENT_NAME:-dsql}
2024-11-05 11:12:42 +00:00
services:
setup:
build:
context: .
dockerfile: Dockerfile.Setup
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.14
2024-12-08 19:56:57 +00:00
container_name: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-setup
hostname: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-setup
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_APP:-.}:/app
- ${DSQL_VOLUME_DB_SSL:-../dsql-data/ssl}:/ssl
2024-12-05 07:03:33 +00:00
- ${DSQL_VOLUME_SSH:-../dsql-data/ssh}:/ssh
2024-11-06 12:57:20 +00:00
2024-11-05 11:12:42 +00:00
webapp:
build:
context: .
dockerfile: ${DSQL_DOCKERFILE:-Dockerfile}
env_file: .env
networks:
datasquirel:
2024-12-05 07:03:33 +00:00
ipv4_address: 172.72.0.34
2024-12-08 19:56:57 +00:00
container_name: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-site
hostname: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-site
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
- ${DSQL_VOLUME_APP:-.}:/app
ports:
- ${DSQL_PORT:-7070}:${DSQL_PORT:-7070}
2024-11-06 12:57:20 +00:00
environment:
- DSQL_SSL_DIR=/app/ssl
2024-11-26 09:31:39 +00:00
restart: always
2024-11-05 11:12:42 +00:00
static:
image: nginx:alpine
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.28
2024-12-08 19:56:57 +00:00
container_name: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-static
hostname: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-static
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_STATIC_CONFIGURATION_FILE:-../dsql-data/static-config/default.conf}:/etc/nginx/conf.d/default.conf
- ${DSQL_VOLUME_STATIC:-../dsql-data/static}:/static
ports:
- ${DSQL_STATIC_SERVER_PORT}:80
2024-11-26 09:31:39 +00:00
restart: always
2024-11-05 11:12:42 +00:00
db:
image: mariadb
env_file: .env
networks:
datasquirel:
ipv4_address: 172.72.0.32
depends_on:
setup:
condition: service_completed_successfully
2024-12-08 19:56:57 +00:00
container_name: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-site-database
2024-11-05 11:12:42 +00:00
volumes:
- ${DSQL_VOLUME_DB:-../dsql-data/db}:/var/lib/mysql
- ${DSQL_VOLUME_DB_CONFIG:-../dsql-data/db-config}:/etc/mysql/conf.d
- ${DSQL_VOLUME_DB_SSL:-../dsql-data/ssl}:/ssl
environment:
2024-11-26 09:31:39 +00:00
- MARIADB_ROOT_PASSWORD=${DSQL_MARIADB_ROOT_PASSWORD:-password}
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
2024-12-08 19:56:57 +00:00
container_name: ${DSQL_DEPLOYMENT_NAME:-dsql}-dsql-db-load-balancer
hostname: ${DSQL_DEPLOYMENT_NAME:-dsql}-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:
- subnet: 172.72.0.0/16
gateway: 172.72.0.1