pr_01m47d24b0e6n91zwymwxg0vpx/deploy/self-host/docker-compose.yml
| 1 | # Self-hosted g1t, phase 1: the core forge on your own machine. |
| 2 | # |
| 3 | # docker compose -f deploy/self-host/docker-compose.yml up --build |
| 4 | # |
| 5 | # Then open http://localhost:8787. Mail (the confirmation link at sign-up) |
| 6 | # lands in Mailpit at http://localhost:8025. |
| 7 | # |
| 8 | # What runs: the site and every core service in one workerd (g1t), git |
| 9 | # repositories as bare repos on a volume (gitstore), and Mailpit for mail. |
| 10 | # Agents, deployments, context search and billing are off. See |
| 11 | # docs/SELF_HOSTING.md. |
| 12 | name: g1t |
| 13 | |
| 14 | services: |
| 15 | g1t: |
| 16 | build: |
| 17 | context: ../.. |
| 18 | dockerfile: deploy/self-host/Dockerfile |
| 19 | ports: |
| 20 | - "${G1T_PORT:-8787}:8787" |
| 21 | environment: |
| 22 | # Where people reach this installation. Links in mail point here. |
| 23 | PUBLIC_URL: ${PUBLIC_URL:-http://localhost:8787} |
| 24 | GITSTORE_URL: http://gitstore:8080 |
| 25 | GITSTORE_SECRET_FILE: /secrets/gitstore |
| 26 | MAIL_URL: ${MAIL_URL:-http://mailpit:8025} |
| 27 | MAIL_FROM: ${MAIL_FROM:-g1t <noreply@localhost>} |
| 28 | volumes: |
| 29 | - g1t-data:/data |
| 30 | - g1t-secrets:/secrets:ro |
| 31 | depends_on: |
| 32 | gitstore: |
| 33 | condition: service_healthy |
| 34 | mailpit: |
| 35 | condition: service_started |
| 36 | restart: unless-stopped |
| 37 | |
| 38 | gitstore: |
| 39 | build: |
| 40 | context: ./gitstore |
| 41 | environment: |
| 42 | GITSTORE_URL: http://gitstore:8080 |
| 43 | GITSTORE_SECRET_FILE: /secrets/gitstore |
| 44 | volumes: |
| 45 | - g1t-git:/data/git |
| 46 | - g1t-secrets:/secrets |
| 47 | # Not published: only the g1t container reaches it. |
| 48 | restart: unless-stopped |
| 49 | |
| 50 | mailpit: |
| 51 | image: axllent/mailpit:latest |
| 52 | ports: |
| 53 | - "${MAILPIT_PORT:-8025}:8025" |
| 54 | # To deliver for real, relay through your SMTP server: |
| 55 | # environment: |
| 56 | # MP_SMTP_RELAY_HOST: smtp.example.com |
| 57 | # MP_SMTP_RELAY_PORT: "587" |
| 58 | # MP_SMTP_RELAY_USERNAME: ... |
| 59 | # MP_SMTP_RELAY_PASSWORD: ... |
| 60 | # MP_SMTP_RELAY_ALL: "true" |
| 61 | restart: unless-stopped |
| 62 | |
| 63 | volumes: |
| 64 | g1t-data: |
| 65 | g1t-git: |
| 66 | g1t-secrets: |