-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
73 lines (72 loc) · 2.03 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
69
70
71
72
73
version: "3"
volumes:
node_modules:
services:
postgres:
restart: always
tty: true
image: postgres:10-alpine
environment:
- POSTGRES_USER=${THICC_USER}
- POSTGRES_PASSWORD=${THICC_PASSWORD}
- POSTGRES_DB=${THICC_DB}
# volumes:
# - ./postgres-data/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
flask:
build: ./backend
tty: true
environment:
- DB_USER=${THICC_USER}
- DB_PASS=${THICC_PASSWORD}
- DB_NAME=${THICC_DB}
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
- BOT_API_TOKEN=${BOT_API_TOKEN}
- LAST_FM_API_KEY=${LAST_FM_API_KEY}
- LAST_FM_SECRET=${LAST_FM_SECRET}
- SECRET_KEY=verysecurekey
- FLASK_APP=src
- FLASK_ENV=development
- OAUTHLIB_INSECURE_TRANSPORT=1 #needed for oauth to work locally
ports:
# - "8000:8000"
- "5000:5000"
volumes:
- ./backend:/thiccflask:rw
depends_on:
- postgres
restart: always
# run this command when you change db models, this does not detect all changes https://flask-migrate.readthedocs.io/en/latest/
# command: sh -c "dockerize -wait tcp://postgres:5432 && flask db migrate"
command: sh -c "dockerize -wait tcp://postgres:5432 && flask db upgrade && flask run --host=0.0.0.0" #&& flask db upgrade
bot:
build: ./bot
tty: true
image: thiccbot
restart: always
environment:
- DISCORD_ID=${DISCORD_ID}
- BACKEND_URL=http://flask:5000/api
- BOT_API_TOKEN=${BOT_API_TOKEN}
- BOT_ADMIN=${BOT_ADMIN}
- BOT_ENV=development
volumes:
- ./bot:/thiccbot:rw
depends_on:
- flask
command: python thiccBot/main.py
# web:
# build: ./web
# tty: true
# environment:
# - PORT=4000
# ports:
# - "4000:4000"
# volumes:
# - ./web:/thiccweb:rw
# # - node_modules:/thiccweb/node_modules:rw
# command: bash -c "cd /thiccweb; rm -f .bsb.lock; npm run dev"
# # depends_on:
# # - flask