-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
157 lines (150 loc) · 3.5 KB
/
docker-compose.yml
File metadata and controls
157 lines (150 loc) · 3.5 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: "3.5"
services:
api:
image: ${CI_REGISTRY_IMAGE:-docker.pkg.github.com/joinimpact/api/api}:${CI_COMMIT_REF:-master}
build:
context: ./
container_name: api
hostname: api
env_file:
- ${APP_ENV_FILE:-./envvars.conf}
expose:
- "3000"
ports:
- "127.0.0.1:3000:3000/tcp"
restart: unless-stopped
depends_on:
- postgres
- elasticsearch
healthcheck:
test:
[
"CMD",
"wget",
"--quiet",
"--tries=1",
"--spider",
"http://localhost:3000/healthcheck",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
container_name: elasticsearch
hostname: elasticsearch
environment:
- node.name=elasticsearch-1
- cluster.name=es-impact
- cluster.initial_master_nodes=elasticsearch-1
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
ulimits:
memlock:
soft: 1024
hard: 1024
volumes:
- elastic01:/usr/share/elasticsearch/data
ports:
- 9200:9200
healthcheck:
test:
[
"CMD",
"wget",
"--quiet",
"--tries=1",
"--spider",
"http://localhost:9200/_cluster/health",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
memcached:
image: memcached:1.6.6-alpine
container_name: memcached
hostname: memcached
ports:
- "127.0.0.1:11211:11211/tcp"
expose:
- "11211"
postgres:
image: postgres:11-alpine
container_name: postgres
hostname: postgres
env_file:
- ${APP_ENV_FILE:-./envvars.conf}
ports:
- "127.0.0.1:5432:5432/tcp"
expose:
- "5432"
volumes:
- ${DATA_PATH:-/tmp}/joinimpact/postgresql:/var/lib/postgresql/data:rw
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -U postgres || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
frontend:
image: ${CI_REGISTRY_IMAGE:-docker.pkg.github.com/joinimpact/impact-frontend/frontend}:${CI_COMMIT_REF:-master}
build:
context: ../impact-frontend
args:
BUILD_TARGET: ${FRONTEND_BUILD_TARGET:-dev}
container_name: frontend
hostname: frontend
expose:
- "80"
ports:
- "127.0.0.1:8080:80/tcp"
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"wget",
"--quiet",
"--tries=1",
"--spider",
"http://localhost/healthcheck",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
nginx:
image: nginx:stable-alpine
container_name: nginx
hostname: nginx
ports:
- "80:80/tcp"
- "443:443/tcp"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- ${DATA_PATH:-/tmp}/joinimpact/certbot/www:/var/www/certbot:ro
- ${DATA_PATH:-/tmp}/joinimpact/certbot/letsencrypt:/etc/letsencrypt:ro
restart: unless-stopped
depends_on:
- api
- frontend
healthcheck:
test:
[
"CMD",
"wget",
"--quiet",
"--tries=1",
"--spider",
"http://localhost/healthcheck",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
elastic01:
driver: local