Skip to content

Commit

Permalink
Update Justfile docker start command for backend
Browse files Browse the repository at this point in the history
 * TIL that Just handles parsing `.env` files automatically.
 * Add some additional environment variables
 * Pass through `$PORT` correctly rather than using `$ROCKET_PORT`
  * The Dockerfile's default command itself maps `$PORT` to `$ROCKET_PORT` explicitly
  • Loading branch information
Ameobea committed Jun 18, 2019
1 parent 6b2587c commit 1ae4a41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ spawn_redis:
docker run --rm -d -p 6379:6379 --name redis redis

docker_start:
export $(egrep -v '^#' .env | xargs)
docker run -it --net host -p 3999:3999 -e ROCKET_DATABASES="{ spotify_homepage = { url = \"$DATABASE_URL\" } }" -e "ROCKET_PORT=3999" -e SPOTIFY_CLIENT_ID="$SPOTIFY_CLIENT_ID" -e SPOTIFY_CLIENT_SECRET="$SPOTIFY_CLIENT_SECRET" -e SERVER_BASE_URL="$SERVER_BASE_URL" -e REDIS_URL="$REDIS_URL" --name spotifytrack-server ameo/spotify-homepage-backend
docker rm spotifytrack-server || true
echo "$SPOTIFY_CLIENT_ID"
docker run -it --net host -p 3999:3999 -e ROCKET_DATABASES="{ spotify_homepage = { url = \"$DATABASE_URL\" } }" -e PORT="$PORT" -e SPOTIFY_CLIENT_ID="$SPOTIFY_CLIENT_ID" -e SPOTIFY_CLIENT_SECRET="$SPOTIFY_CLIENT_SECRET" -e SERVER_BASE_URL="$SERVER_BASE_URL" -e REDIS_URL="$REDIS_URL" -e ADMIN_API_TOKEN="$ADMIN_API_TOKEN" --name spotifytrack-server ameo/spotify-homepage-backend

0 comments on commit 1ae4a41

Please sign in to comment.