From 31d10779529e0e8830a89dfb8c8be6fa978fd98c Mon Sep 17 00:00:00 2001 From: mm Date: Sat, 18 Mar 2023 22:51:07 +0000 Subject: [PATCH] Add 'docker-compose.yml' --- docker-compose.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bb573ba --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.8' + +services: + web: + build: . + ports: + - "5000:5000" + environment: + - SECRET_KEY=mysecretkey + - DATABASE_URL=postgresql://user:password@db:5432/dbname + depends_on: + - db + + db: + image: "postgres:13" + environment: + - POSTGRES_USER=user + - POSTGRES_PASSWORD=password + - POSTGRES_DB=dbname + volumes: + - db-data:/var/lib/postgresql/data + - ./setup.sql:/docker-entrypoint-initdb.d/setup.sql + +volumes: + db-data: