Skip to content

Commit

Permalink
chore(dev-setup): specify env vars directly in compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Mar 5, 2024
1 parent 2afb896 commit 4c8ee77
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .envs/.local/.api

This file was deleted.

2 changes: 0 additions & 2 deletions .envs/.local/.caddy

This file was deleted.

2 changes: 0 additions & 2 deletions .envs/.local/.keycloak

This file was deleted.

4 changes: 0 additions & 4 deletions .envs/.local/.postgres

This file was deleted.

17 changes: 13 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ services:
volumes:
- dbdata:/var/lib/postgresql/data
- ./postgres/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
env_file: ./.envs/.local/.postgres
environment:
- POSTGRES_USER=outdated
- POSTGRES_PASSWORD=outdated
- POSTGRES_DB=outdated
- KEYCLOAK_DB_PASSWORD=keycloak

api:
build: ./api
Expand All @@ -31,7 +35,10 @@ services:
"-c",
"wait-for-it.sh db:5432 -- ./manage.py migrate && ./manage.py runserver 0.0.0.0:8000",
]
env_file: ./.envs/.local/.api
environment:
- ENV=dev
- OIDC_VERIFY_SSL=False
- OIDC_OP_BASE_ENDPOINT=https://outdated.local/auth/realms/outdated/protocol/openid-connect

ember:
build:
Expand All @@ -46,7 +53,8 @@ services:
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
env_file: ./.envs/.local/.caddy
environment:
- DOMAIN_NAME=outdated.local
networks:
default:
aliases:
Expand All @@ -58,7 +66,6 @@ services:
- db
volumes:
- ./keycloak/config.json:/opt/keycloak/data/import/config.json
env_file: ./.envs/.local/.keycloak
environment:
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://db/keycloak
Expand All @@ -68,6 +75,8 @@ services:
- KC_HOSTNAME_STRICT_HTTPS=false
- KC_HTTP_RELATIVE_PATH=/auth
- KC_PROXY=edge
- KC_DB_PASSWORD=keycloak
- KEYCLOAK_ADMIN_PASSWORD=keycloak
# import: docker compose exec keycloak /opt/keycloak/bin/kc.sh import --override true --file /opt/keycloak/data/import/config.json
# export: docker compose exec keycloak /opt/keycloak/bin/kc.sh export --file /opt/keycloak/data/import/config.json
command: "start"
Expand Down

0 comments on commit 4c8ee77

Please sign in to comment.