68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
services:
|
|
db:
|
|
image: mysql:8.0
|
|
container_name: amnezia-panel-db
|
|
restart: unless-stopped
|
|
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword}
|
|
MYSQL_DATABASE: ${DB_DATABASE:-amnezia_panel}
|
|
MYSQL_USER: ${DB_USERNAME:-amnezia}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD:-amnezia}
|
|
ports:
|
|
- "3309:3306"
|
|
volumes:
|
|
- db_data:/var/lib/mysql
|
|
- ./migrations:/docker-entrypoint-initdb.d
|
|
- ./my.cnf:/etc/mysql/conf.d/my.cnf:ro
|
|
healthcheck:
|
|
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: amnezia-panel-web
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
dind:
|
|
condition: service_started
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
APP_ENV: ${APP_ENV:-local}
|
|
DEFAULT_LOCALE: ${DEFAULT_LOCALE:-en}
|
|
DB_HOST: db
|
|
DB_PORT: 3306
|
|
DB_DATABASE: ${DB_DATABASE:-amnezia_panel}
|
|
DB_USERNAME: ${DB_USERNAME:-amnezia}
|
|
DB_PASSWORD: ${DB_PASSWORD:-amnezia}
|
|
DOCKER_HOST: tcp://dind:2375
|
|
volumes:
|
|
- ./:/var/www/html
|
|
ports:
|
|
- "8082:80"
|
|
|
|
dind:
|
|
image: docker:24-dind
|
|
container_name: amnezia-panel-dind
|
|
privileged: true
|
|
restart: unless-stopped
|
|
environment:
|
|
DOCKER_TLS_CERTDIR: ""
|
|
ports:
|
|
- "2375:2375"
|
|
volumes:
|
|
- dind_data:/var/lib/docker
|
|
|
|
volumes:
|
|
db_data:
|
|
dind_data:
|