-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (43 loc) · 1.24 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
42
43
44
45
46
47
48
49
version: '3.8'
services:
slack-bot:
build:
context: .
dockerfile: Dockerfile
image: slack-bot:latest
container_name: slack-bot
networks:
- custom_docker_network
environment:
- SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}
- SLACK_APP_TOKEN=${SLACK_APP_TOKEN}
- ENV=PRODUCTION
- DATABASE_NAME=slackcatdb
- DATABASE_URL=jdbc:postgresql://postgres_container:5432
- DATABASE_USER=newuser
- DATABASE_PASSWORD=password
volumes:
- ./slackcat-prod.db:/slackcat-prod.db # Mount slackcat.db to /app/slackcat.db in the container
ports:
- "8080:8080" # Adjust if your bot needs to expose any ports
# Debugggin
# entrypoint: [ "tail", "-f", "/dev/null" ] # Keep container running without any actions
restart: unless-stopped
postgres:
image: postgres:latest
container_name: postgres_container
environment:
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DB=${DATABASE_NAME} # need to do env dependent?
networks:
- custom_docker_network
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
networks:
custom_docker_network:
driver: bridge