First changes for Docker
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
services:
|
||||
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
container_name: wkvs-nginx
|
||||
ports:
|
||||
- "127.0.0.1:8080:80"
|
||||
- "127.0.0.1:8082:8082"
|
||||
volumes:
|
||||
- .:/var/wkvs
|
||||
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- apache
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
apache:
|
||||
build: ./config/apache
|
||||
container_name: wkvs-apache
|
||||
volumes:
|
||||
- .:/var/wkvs
|
||||
- ./config/apache/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini
|
||||
depends_on:
|
||||
db-init:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
container_name: wkvs-mariadb
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./config/.env.db
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
db-init:
|
||||
build: ./config/apache
|
||||
container_name: wkvs-db-init
|
||||
volumes:
|
||||
- .:/var/wkvs
|
||||
working_dir: /var/wkvs
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- wkvs
|
||||
command: php setup/database/init-db.php
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
container_name: wkvs-redis
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./config/.env.redis
|
||||
command: ["sh", "-c", "exec redis-server --requirepass \"$REDDIS_PASSWORD\""]
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
networks:
|
||||
wkvs:
|
||||
Reference in New Issue
Block a user