Skip to content

Commit

Permalink
chore: improve and fix local compose setup
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele committed Aug 17, 2024
1 parent 01e0cd2 commit a8b6cb0
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 232 deletions.
5 changes: 3 additions & 2 deletions containers/ory/kratos/kratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ serve:
enabled: true
allowed_origins:
- http://127.0.0.1:13001
- http://127.0.0.1:13002
allowed_methods:
- POST
- GET
Expand Down Expand Up @@ -58,7 +59,7 @@ selfservice:
enabled: true
ui_url: http://127.0.0.1:13001/account/recovery
use: code

verification:
enabled: false
ui_url: http://127.0.0.1:13001/account/verification
Expand Down Expand Up @@ -113,6 +114,6 @@ identity:

courier:
smtp:
connection_uri: "smtp://mailhog:1025/?disable_starttls=true"
connection_uri: 'smtp://mailhog:1025/?disable_starttls=true'
from_address: [email protected]
from_name: Takaro
208 changes: 0 additions & 208 deletions deploy/compose/docker-compose.yaml

This file was deleted.

135 changes: 135 additions & 0 deletions deploy/compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
version: "3"
services:
takaro_api:
image: ghcr.io/gettakaro/takaro-app-api:latest
ports:
- 13000:3000
environment:
REDIS_HOST: redis
TAKARO_SERVICE: "app-api"
START_WORKERS: "false"
DISCORD_HANDLE_EVENTS: "false"
POSTGRES_HOST: postgresql
CORS_ALLOWED_ORIGINS: http://127.0.0.1:13000,http://127.0.0.1:13001,http://127.0.0.1:13002
env_file:
- .env
restart: unless-stopped

takaro_worker:
image: ghcr.io/gettakaro/takaro-app-api:latest
environment:
REDIS_HOST: redis
TAKARO_SERVICE: "app-worker"
START_WORKERS: "true"
DISCORD_HANDLE_EVENTS: "false"
POSTGRES_HOST: postgresql
env_file:
- .env
restart: unless-stopped

takaro_discord:
image: ghcr.io/gettakaro/takaro-app-api:latest
environment:
REDIS_HOST: redis
TAKARO_SERVICE: "app-discord"
START_WORKERS: "false"
DISCORD_HANDLE_EVENTS: "true"
POSTGRES_HOST: postgresql
env_file:
- .env
restart: unless-stopped

takaro_migrator:
image: ghcr.io/gettakaro/takaro-app-api:latest
depends_on:
- postgresql
container_name: takaro_migrator
command: npm -w packages/app-api run db:migrate
env_file:
- .env
environment:
POSTGRES_HOST: postgresql
takaro_connector:
image: ghcr.io/gettakaro/takaro-app-connector:latest
container_name: takaro_connector
environment:
REDIS_HOST: "redis"
TAKARO_SERVICE: "app-connector"
TAKARO_HOST: http://takaro_api:3000
env_file:
- .env
restart: unless-stopped

takaro_web:
image: ghcr.io/gettakaro/takaro-web-main:latest
ports:
- 13001:80
environment:
VITE_API: http://127.0.0.1:13000
VITE_ORY_URL: http://127.0.0.1:4433
VITE_POSTHOG_PUBLIC_API_KEY: "placeholder"
VITE_POSTHOG_API_URL: "placeholder"
restart: unless-stopped

postgresql:
image: postgres:15
ports:
- 127.0.0.1:15432:5432
volumes:
- ../../_data/db:/var/lib/postgresql/data
env_file:
- .env
restart: unless-stopped

redis:
image: redis
restart: unless-stopped
ports:
- 127.0.0.1:6379:6379

kratos-migrate:
image: oryd/kratos:v1.0.0
environment:
- DSN=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql_kratos:5432/kratos
volumes:
- ../../containers/ory/kratos:/etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
kratos:
image: oryd/kratos:v1.0.0
ports:
- '127.0.0.1:4433:4433' # public
- '127.0.0.1:4434:4434' # admin
restart: on-failure
environment:
- DSN=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql_kratos:5432/kratos
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
volumes:
- ../../containers/ory/kratos:/etc/config/kratos
postgresql_kratos:
image: postgres:15
ports:
- 127.0.0.1:13101:5432
volumes:
- ../../_data/kratos-db:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: kratos

prometheus:
image: prom/prometheus:v2.52.0
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
ports:
- 9090:9090
volumes:
- ../../containers/prometheus:/etc/prometheus
- ../../_data/prometheus:/prometheus
pushgateway:
image: prom/pushgateway
container_name: pushgateway
ports:
- "9091:9091"
Loading

0 comments on commit a8b6cb0

Please sign in to comment.