From e4fa2edd1e23ed001d25551926dd16d3746c2a47 Mon Sep 17 00:00:00 2001 From: Hannah Eslinger Date: Wed, 25 Oct 2023 11:54:32 -0600 Subject: [PATCH] Fix docker --- buildingmotif/api/Dockerfile | 2 +- docker-compose.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/buildingmotif/api/Dockerfile b/buildingmotif/api/Dockerfile index 00a7e4364..c31edc202 100644 --- a/buildingmotif/api/Dockerfile +++ b/buildingmotif/api/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /opt/ # Install dpeendencies RUN pip install poetry==1.4.0 && poetry config virtualenvs.create false -RUN ls /opt && poetry install --no-dev +RUN ls /opt && poetry install RUN chmod +x /opt/start.sh CMD /opt/start.sh diff --git a/docker-compose.yml b/docker-compose.yml index 59cbb3ae0..dcce8ad8d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,8 @@ services: db: container_name: buildingmotif-db image: postgres + volumes: + - buildingmotif-db:/var/lib/postgresql/data environment: - "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" - "POSTGRES_USER=${POSTGRES_USER}" @@ -30,6 +32,11 @@ services: context: . dockerfile: buildingmotif/api/Dockerfile image: buildingmotif-api:latest + # UNCOMMENT this if you want to preserve local builds for debugging + # volumes: + # - type: bind + # source: ./buildingmotif + # target: /opt/buildingmotif ports: - target: 5000 published: 5000 @@ -52,3 +59,7 @@ services: published: 4200 protocol: tcp mode: host + +volumes: + buildingmotif-db: + external: true \ No newline at end of file