-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (64 loc) · 1.47 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
services:
# PostgreSQL Service
postgres:
image: postgres:13-alpine
container_name: postgres_db
environment:
TZ: GMT
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
PG_DATA: /var/lib/postgresql/data
volumes:
- indexer-pgdata:/var/lib/postgresql/data
ports:
- 5432:5432
# Redis Service
redis:
image: redis:6-alpine
container_name: redis_cache
volumes:
- indexer-redis-volume:/data
ports:
- 6379:6379
# Indexer Service
indexer-scraper:
build:
context: .
container_name: indexer_service
volumes:
# - .:/usr/src/app
- indexer-node-modules:/usr/src/app/node_modules
command: [sh, -c, "pnpm db:indexer-database:migrate:run && pnpm start:indexer"]
env_file:
- .env
environment:
INDEXER_REDIS_HOST: redis
DATABASE_HOST: postgres
depends_on:
- postgres
- redis
# Express API Service
indexer-api:
build:
context: .
container_name: indexer_api
volumes:
# - .:/usr/src/app
- indexer-api-node-modules:/usr/src/app/node_modules
ports:
- ${PORT}:${PORT}
command: pnpm start:indexer-api
env_file:
- .env
environment:
INDEXER_REDIS_HOST: redis
DATABASE_HOST: postgres
depends_on:
- postgres
- redis
volumes:
indexer-node-modules:
indexer-api-node-modules:
indexer-pgdata:
indexer-redis-volume: