-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
41 lines (41 loc) · 1.12 KB
/
docker-compose.yaml
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
version: "3"
services:
api:
build: .
volumes:
- ".:/app"
ports:
- "4000:4000"
command: sh -c "/wait && npm run start"
environment:
- NODE_ENV=dev
- PORT=4000
- CORS_ALLOWED_ORIGINS=*
- NODE_TLS_REJECT_UNAUTHORIZED=0
- TYPEORM_SYNCHRONIZE=false
- TYPEORM_LOGGING=true
- TYPEORM_ENTITIES=src/Entity/*.ts
- TYPEORM_ENTITIES_METRICS=src/EntityMetrics/*.ts
- DATABASE_TYPE=postgres
- DATABASE_URL=postgres://fxhash:password@postgres:5432/fxhash_index
- DATABASE_METRICS_URL=postgres://fxhash:password@postgres:5432/fxhash_metrics
- RECORD_METRICS=0
- REDIS_URL=redis://redis:6379
- WAIT_HOSTS=postgres:5432, redis:6379
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
depends_on:
- postgres
- redis
postgres:
image: postgres:13.5-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
volumes:
- "./init_pg.sh:/docker-entrypoint-initdb.d/init_pg.sh"
ports:
- "5444:5432"
redis:
image: redis:6-alpine