-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
96 lines (90 loc) · 2.79 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
volumes:
shared_volume:
networks:
web:
external: true
internal:
external: false
services:
mysql:
container_name: ${PROJECT_NAME}__mysql
image: mysql:8.0
restart: unless-stopped
env_file: .env.mysql
ports:
- ${PORT_MYSQL}:3306
volumes:
- ./volumes/mysql-data:/var/lib/mysql
- ./config/low-memory-mysql-8.cnf:/etc/mysql/conf.d/low-memory-my.cnf:ro
networks:
- internal
imgproxy:
image: darthsim/imgproxy:latest
container_name: ${PROJECT_NAME}__imgproxy
env_file: .env.imgproxy
ports:
- ${PORT_IMGPROXY}:8080
networks:
- internal
- web
labels:
- traefik.http.routers.${PROJECT_NAME}__imgproxy.rule=Host(`${HOST_IMAGES}`)
- traefik.http.routers.${PROJECT_NAME}__imgproxy.tls=true
- traefik.http.routers.${PROJECT_NAME}__imgproxy.tls.certresolver=lets-encrypt
- traefik.port=${PORT_IMGPROXY}
wordpress:
container_name: ${PROJECT_NAME}__wordpress
build:
context: .
env_file: .env.wordpress
environment:
- PROJECT_NAME=${PROJECT_NAME}
restart: unless-stopped
volumes:
- "${VOLUME}:/var/www/html"
- ./volumes/wordpress-uploads:/var/www/html/web/app/uploads
depends_on:
- mysql
networks:
- internal
- web
ports:
- ${PORT_NGINX}:80
labels:
- traefik.http.routers.${PROJECT_NAME}__nginx.rule=Host(`${HOST_WORDPRESS}`)
- traefik.http.routers.${PROJECT_NAME}__nginx.tls=true
- traefik.http.routers.${PROJECT_NAME}__nginx.tls.certresolver=lets-encrypt
- traefik.port=${PORT_NGINX}
adminer:
container_name: ${PROJECT_NAME}__adminer
image: adminer:latest
restart: unless-stopped
environment:
ADMINER_DEFAULT_SERVER: ${PROJECT_NAME}__mysql
ports:
- ${PORT_ADMINER}:8080
labels:
- traefik.http.routers.${PROJECT_NAME}__adminer.rule=Host(`${HOST_ADMINER}`)
- traefik.http.routers.${PROJECT_NAME}__adminer.tls=true
- traefik.http.routers.${PROJECT_NAME}__adminer.tls.certresolver=lets-encrypt
#- traefik.http.routers.${PROJECT_NAME}__adminer.middlewares=${PROJECT_NAME}__adminer-auth
# echo $(htpasswd -nb user password) | sed -e s/\\$/\\\\\$/g
#- traefik.http.middlewares.${PROJECT_NAME}__adminer-auth.basicauth.users=${ADMINER_USER}:${ADMINER_PASSWORD}
- traefik.port=${PORT_ADMINER}
networks:
- internal
- web
depends_on:
- mysql
volumes:
- ./config/adminer/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro
- ./config/adminer/adminer.css:/var/www/html/adminer.css:ro
backup:
container_name: ${PROJECT_NAME}__backup
image: futurice/docker-volume-backup
restart: unless-stopped
env_file:
- .env.backup
volumes:
- ./volumes:/backup
profiles: ["production"]