add docker-compose.yml

This commit is contained in:
Dawid Wysokiński 2020-05-30 14:19:02 +02:00
parent d5a977ade0
commit ff6034c995
2 changed files with 34 additions and 1 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
.env.development .env.development
.env.production
.env

31
docker-compose.yml Normal file
View File

@ -0,0 +1,31 @@
version: '3.6'
services:
db:
image: 'postgres:10.13'
container_name: twdcpg
networks:
- internal
volumes:
- '/twdcpg:/var/lib/postgresql/data'
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=twdcbot
- TZ=UTC
bot:
build: ./
container_name: twdc
networks:
- internal
environment:
- WAIT_HOSTS=db:5432
- DB_HOST=db
- DB_NAME=twdcbot
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=${POSTGRES_PASSWORD}
- TZ=UTC
- BOT_TOKEN
networks:
internal:
external: false