File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def expired_token_callback(expired_token):
122122
123123logging .debug ("Setting database config from environment variables" )
124124database_config = {
125- "host" : os .getenv ("DB_HOST" ) if not os . getenv ( "IS_DOCKER_COMPOSE" ) else "mysql" ,
125+ "host" : os .getenv ("DB_HOST" ),
126126 "port" : int (os .getenv ("DB_PORT" )),
127127 "user" : os .getenv ("DB_USER" ),
128128 "password" : database_password ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3.3'
22
33services :
44 mysql :
5- image : mysql:8.0.18
5+ image : mysql
66 restart : always
77 environment :
88 MYSQL_ROOT_PASSWORD :
@@ -43,6 +43,8 @@ services:
4343 - PYTHONUNBUFFERED=1
4444 - CELERY_BROKER_URL=redis://redis:6379/0
4545 - CELERY_RESULT_BACKEND=redis://redis:6379/0
46+ - DB_PORT=3306
47+ - DB_HOST=mysql
4648 env_file :
4749 - .env
4850 entrypoint : celery worker --workdir . -A PyMatcha.celery -B --loglevel=info
@@ -68,6 +70,8 @@ services:
6870 environment :
6971 - PYTHONUNBUFFERED=1
7072 - FLASK_DEBUG=true
73+ - DB_PORT=3306
74+ - DB_HOST=mysql
7175 ports :
7276 - " 8080:5000"
7377 volumes :
You can’t perform that action at this time.
0 commit comments