forked from tribesonecommunity/discord-bots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 loc) · 1.36 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
# NOTE: You will probably get errors on the tribesbot container the
# first time you use `docker compose up`. Simply shut down
# the containers and then start them up again. They should
# work after that. I think it has something to do with an
# uninitialized database in the first run.
#
# The database information will be stored in the tribesbot-db
# volume, which might get renamed to something like
# `discord-bots_tribesbot-db`. If you are using the Docker
# installation for a live version of the bot, make sure not
# to delete this volume!
services:
db:
image: postgres
volumes:
- "tribesbot-db:/var/lib/postgresql/data"
ports:
- "$POSTGRES_PORT:$POSTGRES_PORT"
env_file:
- .env
command: -p $POSTGRES_PORT
tribesbot:
depends_on:
- db
build:
context: .
target: build
user: tribesbot
working_dir: /tribesbot
env_file:
- .env
volumes:
- type: bind
source: ./discord_bots
target: /tribesbot/discord_bots
- type: bind
source: ./scripts
target: /tribesbot/scripts
- type: bind
source: ./alembic.ini
target: /tribesbot/alembic.ini
- type: bind
source: ./alembic
target: /tribesbot/alembic
command: "bash startup.sh"
volumes:
tribesbot-db: