Skip to content

Commit

Permalink
Organize env files
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed Aug 13, 2023
1 parent b512a22 commit fda1916
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,5 @@ jobs:
echo "Restarting containers"
export TAG=$TAG
if [ $TAG = "dev" ]; then
export LISTEN=49223
export WORKERS=4
export COUNTRY_UPDATE_DELAY=3650
elif [ $TAG = "main" ]; then
export LISTEN=49222
export WORKERS=12
else
echo "Invalid tag: $TAG"
exit 1
fi
docker compose up -d
docker compose --env-file envs/compose/$TAG.env up -d
EOF
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ services:
depends_on:
- db

env_file:
- envs/app/$TAG.env

environment:
MONGO_HOST: db

Expand Down
1 change: 1 addition & 0 deletions envs/app/dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COUNTRY_UPDATE_DELAY=3650
Empty file added envs/app/main.env
Empty file.
2 changes: 2 additions & 0 deletions envs/compose/dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LISTEN=49223
WORKERS=4
2 changes: 2 additions & 0 deletions envs/compose/main.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LISTEN=49222
WORKERS=12

0 comments on commit fda1916

Please sign in to comment.