forked from UQComputingSociety/uqcsbot-discord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
37 lines (33 loc) · 850 Bytes
/
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
version: '3'
services:
# Build the local Dockerfile to run UQCSbot itself.
uqcsbot:
build:
context: .
target: dev
env_file:
- .env
restart: "unless-stopped"
ports:
- "8080:8080"
depends_on:
- database
volumes:
# Mount the uqcsbot folder so rebuilds aren't required when code is updated.
- ./uqcsbot:/app/uqcsbot
# Build a database container for UQCSbot to use.
database:
image: 'postgres:13'
restart: "unless-stopped"
ports:
- 5432:5432
volumes:
# Reference the persisted volume.
- database-data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: "uqcsbot"
POSTGRES_PASSWORD: "uqcsbot"
POSTGRES_DATABASE: "uqcsbot"
# We want database data to persist, so we put it into a volume.
volumes:
database-data: