-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
133 lines (127 loc) · 3.33 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
126
127
128
129
130
131
132
133
version: "3.7"
services:
web:
build:
context: web
args:
HOSTNAME: ${HOSTNAME}
restart: unless-stopped
# Traefik labels are suggested as an example for people using Traefik,
# remove them if you are using another reverse proxy.
labels:
traefik.enable: 'true'
traefik.frontend.rule: "Host:${HOSTNAME}"
traefik.port: '80'
expose:
- '80'
- '443'
# If you don't want to use a reverse proxy (not suitable for production!)
#ports:
# - '80:80'
# - '443:443'
volumes:
- web:/var/www/html
environment:
HOSTNAME: ${HOSTNAME}
MAIL_DRIVER: ${MAIL_DRIVER}
MAIL_HOST: ${MAIL_HOST}
MAIL_PORT: ${MAIL_PORT}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
MAIL_ENCRYPTION: ${MAIL_ENCRYPTION}
depends_on:
- api
networks:
- web
- default
api:
build: api
restart: unless-stopped
# Traefik labels are suggested as an example for people using Traefik,
# remove them if you are using another reverse proxy.
labels:
traefik.enable: 'true'
traefik.00.frontend.rule: "Host:api-00.${HOSTNAME}"
traefik.00.port: '3000'
traefik.01.frontend.rule: "Host:api-01.${HOSTNAME}"
traefik.01.port: '3001'
traefik.02.frontend.rule: "Host:api-02.${HOSTNAME}"
traefik.02.port: '3002'
traefik.03.frontend.rule: "Host:api-03.${HOSTNAME}"
traefik.03.port: '3003'
traefik.04.frontend.rule: "Host:api-04.${HOSTNAME}"
traefik.04.port: '3004'
expose:
- '3000'
- '3001'
- '3002'
- '3003'
- '3004'
# If you don't want to use a reverse proxy (not suitable for production!)
#ports:
# - '3000:3000'
# - '3001:3001'
# - '3002:3002'
# - '3003:3003'
# - '3004:3004'
environment:
HOSTNAME: ${HOSTNAME}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRETS: ${GOOGLE_CLIENT_SECRETS}
GOOGLE_API_KEY: ${GOOGLE_API_KEY}
FACEBOOK_APP_ID: ${FACEBOOK_APP_ID}
FACEBOOK_SECRET_KEY: ${FACEBOOK_SECRET_KEY}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DB_HOST: maria
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_DB: ${MONGO_INITDB_DATABASE}
MONGO_HOST: mongo
TWITTER_API_KEY: ${TWITTER_API_KEY}
TWITTER_SECRET_KEY: ${TWITTER_SECRET_KEY}
TWITTER_APP_NAME: ${TWITTER_APP_NAME}
volumes:
- api:/opt/socioboard-api
networks:
- web
- default
depends_on:
- maria
- mongo
mongo:
image: mongo
restart: unless-stopped
environment:
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
env_file:
- .env.mongo
volumes:
- mongo-config:/data/configdb
- mongo-db:/data/db
- ./mongo/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
maria:
image: mariadb
restart: unless-stopped
volumes:
- maria:/var/lib/mysql
environment:
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
env_file:
- .env.maria
networks:
web:
external: true
volumes:
api:
maria:
mongo-config:
mongo-db:
db:
redis:
web: