From 7e5f8b7ee21293e1682265a356a4ebf08026f97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 13 Feb 2022 20:46:47 +0100 Subject: [PATCH] use docker compose --- .dockerignore | 3 +++ .gitignore | 3 +-- docker-compose.yml | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..871eb40 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +helm/ +venv/ +.idea/ diff --git a/.gitignore b/.gitignore index 13a10e7..6db2e6c 100644 --- a/.gitignore +++ b/.gitignore @@ -130,5 +130,4 @@ dmypy.json #Pycharm .idea/ -*.iml -*wav \ No newline at end of file +*.iml \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..25c4889 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3.1' + +services: + + db: + image: postgres:14 + restart: always + environment: + POSTGRES_USER: mealsapi + POSTGRES_PASSWORD: meals + POSTGRES_DB: mealsdb + + mealsapi: + image: registry.kmlabz.com/tormakris/meals_homework + restart: always + environment: + DATABASE_URI: "postgresql://mealsapi:meals@db:5432/mealsdb" + ports: + - "127.0.0.1:8080:8080" \ No newline at end of file