Skip to content

Commit

Permalink
chore: Update .env.example with DOCKER_HOSTDOCKER_SRV_HOST
Browse files Browse the repository at this point in the history
Fixes issues related to docker/compose#9871 (docker-compose versions newer than v2.11.2)
  • Loading branch information
5HT2 committed Mar 16, 2023
1 parent ffd1cd2 commit 5a4c4fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ REDIS_HOST=localhost
REDIS_PORT=6379

# Used in Docker. Don't touch this if you're not modifying `docker-compose.yml`
DOCKER_HOST=127.0.0.1
DOCKER_SRV_HOST=127.0.0.1
DOCKER_POSTGRES_HOST=postgres
DOCKER_REDIS_HOST=redis
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
networks:
- tripreporter-net
ports:
- "${DOCKER_HOST}:${SRV_PORT}:${SRV_PORT}"
- "${DOCKER_SRV_HOST}:${SRV_PORT}:${SRV_PORT}"

postgres:
container_name: tripreporter-postgres
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func main() {
logger.Fatal("err loading .env file (copy the .env.example)", zap.Error(err))
}

// Only SRV_ADDR, REDIS_PASS and DOCKER_HOST can be empty, anything else is validated.
// Only SRV_ADDR, REDIS_PASS and DOCKER_SRV_HOST can be empty, anything else is validated.
if err := validateEnvKeys(
"SRV_PORT", "DEV_PORT", "SITE_NAME", "WORDLIST", "ACCOUNT_CONFIG", "DOCS_URL", "CORS_LOGGING", "VUE_APP_PROD_URL", "VUE_APP_DEV_URL", "VUE_APP_FORMKIT_API_KEY", "DB_NAME", "DB_USER", "DB_PASS", "DB_HOST", "DB_PORT", "REDIS_HOST", "REDIS_HOST", "DOCKER_POSTGRES_HOST", "DOCKER_REDIS_HOST",
); err != nil {
Expand Down

0 comments on commit 5a4c4fb

Please sign in to comment.