Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/20-add-start-devsh-to-start-with…
Browse files Browse the repository at this point in the history
…-exposed-postgres-and-image-from-local-code' into 22-synchronize-endpoints-wrt-esdl-encoding
  • Loading branch information
MarkTNO committed Sep 13, 2024
2 parents 43c7ad8 + 2759c7c commit 13efdc2
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 14 deletions.
6 changes: 3 additions & 3 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.override.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
omotes-rest:
image: omotes-rest-dev
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

networks:
omotes:
external: true
Expand Down
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}';"
Expand Down
3 changes: 1 addition & 2 deletions scripts/start-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/stop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
. scripts/_select_docker_compose.sh

$DOCKER_COMPOSE down
$DOCKER_COMPOSE -f ./docker-compose.yml --profile=manual_setup down

0 comments on commit 13efdc2

Please sign in to comment.