Created
March 31, 2026 10:41
-
-
Save hiteshchoudhary/8ce7df3ec53ae0dfc6065f206da86f76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| caddy: | |
| image: caddy:alpine | |
| depends_on: | |
| - app | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| - "443:443/udp" | |
| volumes: | |
| - caddy_data:/data | |
| - caddy_config:/config | |
| command: > | |
| sh -c 'printf "thecodinghero.com {\n reverse_proxy app:3001\n}\nadmin.thecodinghero.com {\n reverse_proxy app:3002\n}\n" > /etc/caddy/Caddyfile && caddy run --config /etc/caddy/Caddyfile' | |
| restart: unless-stopped | |
| app: | |
| depends_on: | |
| postgres: | |
| condition: service_healthy | |
| image: svhd/logto:${TAG-latest} | |
| entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"] | |
| expose: | |
| - 3001 | |
| - 3002 | |
| environment: | |
| - TRUST_PROXY_HEADER=1 | |
| - DB_URL=postgres://postgres:p0stgr3s@postgres:5432/logto | |
| - ENDPOINT=https://thecodinghero.com | |
| - ADMIN_ENDPOINT=https://admin.thecodinghero.com | |
| restart: unless-stopped | |
| postgres: | |
| image: postgres:17-alpine | |
| user: postgres | |
| environment: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: p0stgr3s | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready"] | |
| interval: 5s | |
| timeout: 5s | |
| retries: 5 | |
| restart: unless-stopped | |
| volumes: | |
| caddy_data: | |
| caddy_config: | |
| postgres_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment