-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml.orig
76 lines (70 loc) · 1.53 KB
/
docker-compose.yml.orig
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
version: '3.5'
services:
#MySQL Service
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
volumes:
- dbdata:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
networks:
- app-network
#WordPress application code Service
app:
depends_on:
- db
image: wordpress:5.1.1-fpm-alpine
container_name: app
restart: unless-stopped
env_file: .env
environment:
- WORDPRESS_DB_HOST=db:3306
- WORDPRESS_DB_USER=$MYSQL_USER
- WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
- WORDPRESS_DB_NAME=wordpress
- WORDPRESS_CONFIG_EXTRA=
define('FS_METHOD', 'direct');
define('DISALLOW_FILE_EDIT', true);
volumes:
- app:/var/www/html
networks:
- app-network
#Webserver Nginx service
webserver:
depends_on:
- app
image: nginx:1.15.12-alpine
container_name: webserver
restart: unless-stopped
ports:
- "80:80"
#- "443:443"
volumes:
- app:/var/www/html
- ./nginx-conf:/etc/nginx/conf.d
- certbot-etc:/etc/letsencrypt
networks:
- app-network
#certbot service
certbot:
depends_on:
- webserver
image: certbot/certbot
container_name: certbot
volumes:
- certbot-etc:/etc/letsencrypt
- app:/var/www/html
command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --staging -d example.com -d www.example.com
#Volumes
volumes:
certbot-etc:
app:
dbdata:
#Networks
networks:
app-network:
driver: bridge