Skip to content

Commit

Permalink
Use DATABASE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
vladsavelyev committed Feb 16, 2024
1 parent 3ea6bae commit 5c37dcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 1 addition & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
GITHUB_TOKEN=xxx
MYSQL_ROOT_PASSWORD=xxx
MYSQL_DB=xxx
MYSQL_USER=xxx
MYSQL_PASSWORD=xxx
MYSQL_HOST=localhost
DATABASE_URL=xxx
UVICORN_RELOAD=
# For development:
# UVICORN_RELOAD=--reload
9 changes: 3 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
# Set in .env
# Don't pass the root password
environment:
DATABASE_URL: mysql+pymysql://$MYSQL_USER:$MYSQL_PASSWORD@db:3306/$MYSQL_DB
DATABASE_URL: $$DATABASE_URL
GITHUB_TOKEN: $GITHUB_TOKEN
depends_on:
wait-for-db:
Expand All @@ -24,13 +24,10 @@ services:
volumes:
- ./.mysql-data/db:/var/lib/mysql
ports:
- 3306:3306
- "3306:3306"
# Set in .env
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: $MYSQL_DB
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
DATABASE_URL: $DATABASE_URL
wait-for-db:
container_name: wait_for_db
image: atkrad/wait4x
Expand Down

0 comments on commit 5c37dcc

Please sign in to comment.