update docker compose http

This commit is contained in:
holzi1005 2024-12-08 07:40:04 +01:00
parent 083f4740db
commit a41dd1f89e
3 changed files with 8 additions and 6 deletions

View file

@ -54,6 +54,7 @@ services:
restart: unless-stopped
environment:
APP_ENV: prod
DATABASE_URL: mysql://odc:<odcMySqlPw>@db-odc:3306/odc
OAUTH_KEYCLOAK_CLIENT_ID: opendatenschutzcenter
OAUTH_KEYCLOAK_CLIENT_SECRET: <clientsecret>

View file

@ -18,11 +18,6 @@ else
echo "ODC_DB_PW=$ODC_DB_PW" >> $FILE
source $FILE
fi
ENVIRONMENT=${ENVIRONMENT:=prod}
read -p "Enter the environment dev/prod[$ENVIRONMENT]: " input
ENVIRONMENT=${input:=$ENVIRONMENT}
sed -i '/APP_ENV/d' $FILE
echo "APP_ENV=$ENVIRONMENT" >> $FILE
HTTP_METHOD=${HTTP_METHOD:=http}
read -p "Enter http/https for testing on local environment ALWAYS use http [$HTTP_METHOD]: " input
@ -57,10 +52,16 @@ echo ------------------------------------------------------------
echo ----------------- Build Docker Compose File ----------------
echo ------------------------------------------------------------
cp docker-compose.$HTTP_METHOD.yml docker-compose.yml
sed -i "s|<keycloakAdminPw>|$KEYCLOAK_ADMIN_PW|g" docker-compose.yml
sed -i "s|<keycloak-pw>|$KEYCLOAK_PW|g" docker-compose.yml
sed -i "s|<clientsecret>|$OAUTH_KEYCLOAK_CLIENT_ID|g" docker-compose.yml
sed -i "s|<clientUrl>|$PUBLIC_URL|g" docker-compose.yml
sed -i "s|<httpMethod>|$HTTP_METHOD|g" docker-compose.yml
sed -i "s|<odcMySqlPw>|$ODC_DB_PW|g" docker-compose.yml
sed -i "s|<hostIp>|$HOST_IP|g" docker-compose.yml
sed -i "s|<hostIp>|$HOST_IP|g" docker-compose.yml
echo ------------------------------------------------------------
echo ----------------- Select and Start Docker Compose ----------
echo ------------------------------------------------------------