Skip to content

Commit

Permalink
chore: misc. fixes related to containerization
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanemachine committed Oct 1, 2023
1 parent 8fba064 commit ab0194c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions support/containers/compose.phoenix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ services:
PORT: "${PORT:?}"
SECRET_KEY_BASE: "${SECRET_KEY_BASE:?}"

# db
# database
DATABASE_URL: "${DATABASE_URL:?}"

# email
AWS_REGION: "${AWS_REGION:?}"
AWS_ACCESS_KEY: "${AWS_ACCESS_KEY:?}"
AWS_SECRET: "${AWS_SECRET:?}"
AWS_SECRET: "${AWS_SECRET}"

# sentry
SENTRY_DSN: "${SENTRY_DSN:?}"
SENTRY_DSN: "${SENTRY_DSN}"
2 changes: 1 addition & 1 deletion support/containers/networks/compose.phoenix-traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:
phoenix:
environment:
DATABASE_URL: "ecto://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST:-postgres}/${POSTGRES_DB}"
DATABASE_URL: "${DATABASE_URL:?}"
networks:
- "traefik-global-proxy"
- "phoenix-todo-list"
Expand Down
1 change: 0 additions & 1 deletion support/containers/networks/compose.postgres-traefik.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
services:
postgres:
hostname: "postgres"
networks:
- "phoenix-todo-list"
ports:
Expand Down
4 changes: 2 additions & 2 deletions support/scripts/dotenv-generate--template
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ PHX_HOST=\"${PHX_HOST:-$default_phx_host}\"
PORT=\"${PORT:-4000}\"
SECRET_KEY_BASE=\"${SECRET_KEY_BASE:-$(openssl rand -base64 48)}\"
# db
# database
POSTGRES_DB=\"${POSTGRES_DB:-todo_list}\"
POSTGRES_HOST=\"${POSTGRES_HOST:-postgres}\"
POSTGRES_USER=\"${POSTGRES_USER:-postgres}\"
POSTGRES_PASSWORD=\"${POSTGRES_PASSWORD:-postgres}\"
DATABASE_URL=\"${DATABASE_URL:-ecto://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-postgres}/${POSTGRES_DB:-todo_list}}\"
DATABASE_URL=\"${DATABASE_URL:-ecto://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-localhost}/${POSTGRES_DB:-todo_list}}\"
# docker
COMPOSE_PROJECT_NAME=\"${COMPOSE_PROJECT_NAME:-phoenix-todo-list}\"
Expand Down
4 changes: 2 additions & 2 deletions support/scripts/systemd-container-service-file-generate
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ Environment=SECRET_KEY_BASE=\"$SECRET_KEY_BASE\"
# db
Environment=DATABASE_URL=\"$DATABASE_URL\"
Environment=POSTGRES_DB=\"$POSTGRES_DB\"
Environment=POSTGRES_HOST=\"$POSTGRES_HOST\"
Environment=POSTGRES_USER=\"$POSTGRES_USER\"
Environment=POSTGRES_PASSWORD=\"$POSTGRES_PASSWORD\"
Environment=POSTGRES_HOST=\"$POSTGRES_HOST\"
Environment=POSTGRES_DB=\"$POSTGRES_DB\"
# docker
# fix container timeout issues caused by slow CPU and/or RAM
Expand Down

0 comments on commit ab0194c

Please sign in to comment.