From d573b93f10e3cfc6382268a851a0203d7b54f433 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Fri, 30 Apr 2021 15:48:17 +0200 Subject: [PATCH] Fix database connection --- osp/docker-compose.yml | 4 +++- osp/live.env.tpl | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osp/docker-compose.yml b/osp/docker-compose.yml index c73a1e5..5ee175e 100644 --- a/osp/docker-compose.yml +++ b/osp/docker-compose.yml @@ -11,8 +11,10 @@ services: - osp-db - osp-redis container_name: osp-app - entrypoint: ["/opt/osp/setup/docker/wait-for-it.sh", "db:3306", "-t", "60", "--", "/opt/osp/setup/docker/entrypoint.sh"] + entrypoint: ["/opt/osp/setup/docker/wait-for-it.sh", "osp-db:3306", "-t", "60", "--", "/opt/osp/setup/docker/entrypoint.sh"] env_file: live.env + environment: + - DB_URL=mysql+pymysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}/${MYSQL_DATABASE} image: deamos/openstreamingplatform:latest labels: # Watchtower diff --git a/osp/live.env.tpl b/osp/live.env.tpl index dbbaf77..660b078 100644 --- a/osp/live.env.tpl +++ b/osp/live.env.tpl @@ -11,7 +11,6 @@ REDIS_HOST_PASSWORD=password_redis # osp OSP_ROOT=/home/compute/services/osp -DB_URL=mysql+pymysql://osp:password_db@osp-db/osp?charset=utf8mb4 # Change these according to above set parameters following this schema mysql+pymysql://username:password@localhost/osp?charset=utf8mb4 FLASK_SECRET=very_secret_key_change_me FLASK_SALT=very_secret_salt_key_change_me REDIS_PASSWORD=password_redis @@ -19,4 +18,4 @@ OSP_ALLOWREGISTRATION=False OSP_REQUIREVERIFICATION=False # Traefik -DOMAIN=domain.com \ No newline at end of file +DOMAIN=domain.com