-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·65 lines (60 loc) · 1.45 KB
/
docker-compose.yml
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
services:
database-cedro:
image: mysql:8.0
container_name: database-cedro
restart: unless-stopped
env_file: .env
ports:
- "${DB_PORT}:3306"
expose:
- "3306"
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_HOST: '%' # Allow connections from any host
MYSQL_ROOT_HOST: '%' # Allow connections from any host
volumes:
- dbdata:/var/lib/mysql
networks:
- cedro-network
wordpress-cedro:
build:
context: .
dockerfile: Dockerfile
container_name: wordpress-cedro
restart: unless-stopped
env_file: .env
volumes:
- ./:/var/www/html
networks:
- cedro-network
webserver-cedro:
depends_on:
- database-cedro
image: nginx:1.15.12-alpine
container_name: webserver-cedro
restart: unless-stopped
ports:
- "80:80"
- 443:443
volumes:
- ./:/var/www/html
- ./docker/nginx-conf:/etc/nginx/conf.d
- ./docker/nginx-conf/ssl:/etc/nginx/conf.d/ssl
networks:
- cedro-network
# Cloudflare Tunnel
cloudflared-cedro:
container_name: cloudflared-cedro
image: cloudflare/cloudflared:latest
command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TOKEN}
restart: unless-stopped
networks:
- cedro-network
volumes:
dbdata:
networks:
cedro-network:
driver: bridge