-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
125 lines (116 loc) · 3.03 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '3.1'
services:
# Database
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_DATABASE: wordpress
MYSQL_USER_FILE: /run/secrets/db_user
MYSQL_PASSWORD_FILE: /run/secrets/db_password
networks:
- wpsite
secrets:
- db_root_password
- db_user
- db_password
# phpmyadmin
phpmyadmin:
depends_on:
- db
image: phpmyadmin/phpmyadmin
restart: unless-stopped
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
PMA_ABSOLUTE_URI: ${SCHEMA:?Schema must be set}://${HOST_URL:?Host URL must be set}/phpma/
networks:
- wpsite
- proxysite
secrets:
- db_root_password
# Wordpress
wordpress:
depends_on:
- db
build: wordpress
image: devgulp_wordpress
restart: unless-stopped
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER_FILE: /run/secrets/db_user
WORDPRESS_DB_PASSWORD_FILE: /run/secrets/db_password
WORDPRESS_URL: ${HOST_URL:?Host URL must be set}:8000
WORDPRESS_SCHEMA: ${SCHEMA:?Schema must be set}
WORDPRESS_TITLE: DevGulp
WORDPRESS_TAGLINE: A platform built for developers, by developers.
WORDPRESS_ADMIN_USER_FILE: /run/secrets/wp_admin_user
WORDPRESS_ADMIN_PASSWORD_FILE: /run/secrets/wp_admin_password
WORDPRESS_ADMIN_EMAIL: [email protected]
JWT_AUTHENTICATION_SECRET_KEY_FILE: /run/secrets/jwt_auth_key
volumes:
- wp_data:/var/www/html
networks:
- wpsite
- proxysite
secrets:
- db_user
- db_password
- wp_admin_user
- wp_admin_password
- jwt_auth_key
# Frontend Express/Next
frontend:
build:
context: frontend
image: devgulp_frontend
restart: unless-stopped
environment:
DEVGULP_STRIPE_SECRET_KEY_FILE: /run/secrets/stripe_private_key
DEVGULP_STRIPE_PUBLIC_KEY_FILE: /run/secrets/stripe_public_key
API_URL: ${SCHEMA:?Schema must be set}://${HOST_URL:?Host URL must be set}:8000
networks:
- proxysite
secrets:
- stripe_private_key
- stripe_public_key
proxy:
build:
context: proxy
image: devgulp_proxy
restart: unless-stopped
environment:
ENABLE_LETSENCRYPT: ${ENABLE_LETSENCRYPT:-0}
HOST_URL: ${HOST_URL:?Host URL must be set}
ports:
- '80:80'
- '443:443'
- '8000:8000'
networks:
- proxysite
networks:
wpsite:
proxysite:
volumes:
db_data:
wp_data:
secrets:
db_root_password:
file: secrets/db_root_password.txt
db_user:
file: secrets/db_user.txt
db_password:
file: secrets/db_password.txt
wp_admin_user:
file: secrets/wp_admin_user.txt
wp_admin_password:
file: secrets/wp_admin_password.txt
jwt_auth_key:
file: secrets/jwt_auth_key.txt
stripe_public_key:
file: secrets/stripe_public_key.txt
stripe_private_key:
file: secrets/stripe_private_key.txt