-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (63 loc) · 1.51 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
version: '3.9'
x-logging: &default-logging
driver: awslogs
options:
mode: non-blocking
awslogs-region: us-east-1
awslogs-group: snx-api-prod
awslogs-create-group: 'true'
tag: '{{ with split .ImageName ":" }}{{join . "_"}}{{end}}/{{.Name}}/{{.ID}}'
services:
api:
container_name: api
restart: unless-stopped
build: .
environment:
- REDIS_HOST=cache
- REDIS_PORT=6379
env_file:
- api.env
ports:
- 3000:3000
depends_on:
- cache
networks:
- api
logging: *default-logging
cache:
container_name: cache
image: redis:7.0.10-alpine
restart: unless-stopped
ports:
- 6379:6379
command: /bin/sh -c "redis-server --save 20 1 --loglevel warning --requirepass $$REDIS_HOST_PASSWORD"
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
- REDIS_REPLICATION_MODE=master
env_file:
- redis.env
networks:
- api
logging: *default-logging
proxy:
container_name: proxy
image: synthetixio/nginx:d294126f4b4f41d99538217ce68f2e8e9bfcc6fd-base
restart: unless-stopped
volumes:
- ./nginx/templates:/etc/nginx/templates
- ./nginx/scripts/setup-whitelist.sh:/docker-entrypoint.d/setup-whitelist.sh
ports:
- 80:80
environment:
- NGINX_HOST=localhost
- NGINX_PORT=80
- SNX_API_PROXY_URL=http://api:3000
env_file:
- nginx.env
depends_on:
- api
networks:
- api
# logging: *default-logging
networks:
api: