From ff6034c995206b83a55641da521f3ec707ebecda Mon Sep 17 00:00:00 2001 From: Kichiyaki Date: Sat, 30 May 2020 14:19:02 +0200 Subject: [PATCH] add docker-compose.yml --- .gitignore | 4 +++- docker-compose.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index 4a61ec7..d44addc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -.env.development \ No newline at end of file +.env.development +.env.production +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..709f260 --- /dev/null +++ b/docker-compose.yml @@ -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