78 lines
1.6 KiB
YAML
78 lines
1.6 KiB
YAML
|
version: '3.7'
|
||
|
|
||
|
networks:
|
||
|
web:
|
||
|
external: true
|
||
|
backend:
|
||
|
driver: bridge
|
||
|
|
||
|
services:
|
||
|
|
||
|
redis:
|
||
|
image: 'bitnami/redis:5.0'
|
||
|
networks:
|
||
|
- backend
|
||
|
container_name: redis
|
||
|
restart: unless-stopped
|
||
|
environment:
|
||
|
- ALLOW_EMPTY_PASSWORD=yes
|
||
|
ports:
|
||
|
- '127.0.0.1:6379:6379'
|
||
|
# volumes:
|
||
|
# - 'redis-data:/bitnami/redis/data'
|
||
|
labels:
|
||
|
- "traefik.enable=false"
|
||
|
|
||
|
db:
|
||
|
image: mariadb:10.4
|
||
|
container_name: mysql
|
||
|
command: --default-authentication-plugin=mysql_native_password
|
||
|
networks:
|
||
|
- backend
|
||
|
restart: unless-stopped
|
||
|
# env_file:
|
||
|
# - .env
|
||
|
volumes:
|
||
|
# - ./wp-db:/var/lib/mysql
|
||
|
- ./config/my.cnf:/etc/mysql/conf.d/zzz_my.cnf
|
||
|
ports:
|
||
|
- "127.0.0.1:3306:3306"
|
||
|
environment:
|
||
|
- MYSQL_ROOT_PASSWORD=db
|
||
|
labels:
|
||
|
- "traefik.enable=false"
|
||
|
|
||
|
nginx:
|
||
|
image: nginx:1.17-alpine
|
||
|
depends_on:
|
||
|
- wordpress
|
||
|
container_name: nginx-wp-stack
|
||
|
networks:
|
||
|
- backend
|
||
|
- web
|
||
|
volumes:
|
||
|
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
|
||
|
- ./wordpress:/usr/share/nginx/html:ro
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
- "traefik.http.routers.nginx-wp-stack.entrypoints=http"
|
||
|
- "traefik.http.routers.nginx-wp-stack.rule=Host(`wp-stack.wptest.isnet.uk`)"
|
||
|
- "traefik.docker.network=web"
|
||
|
|
||
|
wordpress:
|
||
|
depends_on:
|
||
|
- db
|
||
|
networks:
|
||
|
- backend
|
||
|
container_name: wordpress
|
||
|
# env_file:
|
||
|
# - .env
|
||
|
build: ./
|
||
|
ports:
|
||
|
- "127.0.0.1:8081:80"
|
||
|
- "127.0.0.1:9000:9000"
|
||
|
volumes:
|
||
|
- ./wordpress:/var/www/wordpress
|
||
|
labels:
|
||
|
- "traefik.enable=false"
|