generated from ChatSift/bot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.16 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
version: '3.7'
services:
postgres:
image: postgres:12-alpine
environment:
POSTGRES_USER: 'social'
POSTGRES_PASSWORD: 'admin'
POSTGRES_DB: 'social'
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
ports:
- 127.0.0.1:${DATABASE_PORT}:5432
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U social']
interval: 10s
timeout: 5s
redis:
image: redis:6-alpine
volumes:
- redis-data:/data
restart: unless-stopped
ports:
- 127.0.0.1:6379:6379
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping']
interval: 10s
timeout: 5s
bot:
image: chatsift/social
build:
context: ./
dockerfile: ./Dockerfile
env_file:
- ./.env
environment:
DATABASE_URL: 'postgresql://social:admin@postgres:5432/social'
restart: unless-stopped
volumes:
- ./logs:/usr/social/logs
depends_on:
- postgres
command: 'sh -c "yarn prisma migrate deploy && node --enable-source-maps ./packages/bot/dist/index.js"'
volumes:
postgres-data:
name: 'social-postgres-data'
redis-data:
name: 'social-redis-data'