From 2759c7cdb6f58eee563e873529d36bad00933e64 Mon Sep 17 00:00:00 2001 From: Mark Vrijlandt Date: Fri, 13 Sep 2024 15:23:27 +0200 Subject: [PATCH] cleaned up scripts after docker compose updates --- dev.Dockerfile | 6 +++--- docker-compose.override.dev.yml | 2 -- docker-compose.yml | 2 -- postgres_db_upgrade/scripts/start_postgres_in_setup_mode.sh | 2 +- scripts/setup.sh | 2 +- scripts/start-dev.sh | 3 +-- scripts/start.sh | 3 +-- scripts/stop.sh | 2 +- 8 files changed, 8 insertions(+), 14 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index c5eddde..120a360 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -2,7 +2,7 @@ FROM python:3.10-slim WORKDIR /app -ENV ENV=prod +ENV ENV=dev ENV FLASK_APP=omotes_rest/main.py RUN apt-get -y update @@ -13,8 +13,8 @@ RUN pip install --no-cache-dir -r /app/omotes_rest/requirements.txt COPY ../omotes-sdk-protocol/python/ /omotes-sdk-protocol/python/ COPY ../omotes-sdk-python/ /omotes-sdk-python/ -RUN pip install -e /omotes-sdk-python/ -RUN pip install -e /omotes-sdk-protocol/python/ +RUN pip install /omotes-sdk-python/ +RUN pip install /omotes-sdk-protocol/python/ COPY omotes-rest/src /app # To avoid warning from flask dotenv. diff --git a/docker-compose.override.dev.yml b/docker-compose.override.dev.yml index d08cc31..d66783c 100644 --- a/docker-compose.override.dev.yml +++ b/docker-compose.override.dev.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: omotes-rest: image: omotes-rest-dev diff --git a/docker-compose.yml b/docker-compose.yml index 632449a..17386c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - networks: omotes: external: true diff --git a/postgres_db_upgrade/scripts/start_postgres_in_setup_mode.sh b/postgres_db_upgrade/scripts/start_postgres_in_setup_mode.sh index 1e00f8c..c0d2299 100755 --- a/postgres_db_upgrade/scripts/start_postgres_in_setup_mode.sh +++ b/postgres_db_upgrade/scripts/start_postgres_in_setup_mode.sh @@ -1,4 +1,4 @@ #!/bin/bash docker compose -f ../docker-compose.dev.yml down rest_postgres_db -docker compose -f ../docker-compose.dev.yml up --wait rest_postgres_db_dev +docker compose -f ../docker-compose.yml -f ../docker-compose.override.dev.yml up --wait rest_postgres_db diff --git a/scripts/setup.sh b/scripts/setup.sh index 5760eaf..cd283f0 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -6,7 +6,7 @@ #$DOCKER_COMPOSE stop # Deploy postgres omotes_rest schema -$DOCKER_COMPOSE -f ./docker-compose.yml --profile=manual_dev down rest_postgres_db_dev +$DOCKER_COMPOSE -f ./docker-compose.yml down rest_postgres_db $DOCKER_COMPOSE -f ./docker-compose.yml up -d --wait rest_postgres_db $DOCKER_COMPOSE -f ./docker-compose.yml exec rest_postgres_db psql -d postgres -c 'CREATE DATABASE omotes_rest;' $DOCKER_COMPOSE -f ./docker-compose.yml exec rest_postgres_db psql -d omotes_rest -c "CREATE USER ${POSTGRES_USERNAME} WITH PASSWORD '${POSTGRES_PASSWORD}';" diff --git a/scripts/start-dev.sh b/scripts/start-dev.sh index b53c779..297c593 100755 --- a/scripts/start-dev.sh +++ b/scripts/start-dev.sh @@ -2,6 +2,5 @@ . scripts/_select_docker_compose.sh -$DOCKER_COMPOSE -f ./docker-compose.dev.yml -f ./docker-compose.override.dev.yml --profile=manual_dev --profile=manual_setup down -$DOCKER_COMPOSE -f ./docker-compose.yml -f ./docker-compose.override.dev.yml down +$DOCKER_COMPOSE -f ./docker-compose.yml --profile=manual_setup down $DOCKER_COMPOSE -f ./docker-compose.yml -f ./docker-compose.override.dev.yml up --wait --build diff --git a/scripts/start.sh b/scripts/start.sh index 07ac697..be1da22 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -2,6 +2,5 @@ . scripts/_select_docker_compose.sh -$DOCKER_COMPOSE -f ./docker-compose.dev.yml --profile=manual_dev --profile=manual_setup down -$DOCKER_COMPOSE -f ./docker-compose.yml down +$DOCKER_COMPOSE -f ./docker-compose.yml --profile=manual_setup down $DOCKER_COMPOSE -f ./docker-compose.yml up --wait diff --git a/scripts/stop.sh b/scripts/stop.sh index cfa898d..495df45 100755 --- a/scripts/stop.sh +++ b/scripts/stop.sh @@ -1,4 +1,4 @@ #!/bin/bash . scripts/_select_docker_compose.sh -$DOCKER_COMPOSE down +$DOCKER_COMPOSE -f ./docker-compose.yml --profile=manual_setup down