Last active
November 29, 2025 18:38
-
-
Save mattcantstop/f9d433172c63b629e055801fb2258592 to your computer and use it in GitHub Desktop.
Docker Compose file
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
| version: "3.9" | |
| services: | |
| db: | |
| image: postgres:15-alpine | |
| container_name: spoonme_db | |
| environment: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: spoonme_dev | |
| ports: | |
| - "5432:5432" | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U postgres"] | |
| interval: 5s | |
| timeout: 5s | |
| retries: 10 | |
| web: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| container_name: spoonme_web | |
| depends_on: | |
| db: | |
| condition: service_healthy | |
| env_file: | |
| - .env.dev | |
| environment: | |
| MIX_ENV: dev | |
| PHX_SERVER: "true" | |
| # If you prefer not to use env_file for DB: | |
| # DATABASE_URL: ecto://postgres:postgres@db:5432/spoonme_dev | |
| ports: | |
| - "4000:4000" | |
| working_dir: /app | |
| volumes: | |
| - .:/app | |
| command: > | |
| sh -c " | |
| mix deps.get && | |
| cd assets && npm install && cd .. && | |
| mix ecto.create && | |
| mix ecto.migrate && | |
| mix phx.server | |
| " | |
| volumes: | |
| postgres_data: | |
| # Phoenix / DB | |
| DATABASE_URL=ecto://postgres:postgres@db:5432/spoonme_dev | |
| SECRET_KEY_BASE=dev-secret-key-change-me | |
| # Typesense Cloud (example – replace with your real values) | |
| # These names should match what you use in config.exs/dev.exs | |
| TYPESENSE_HOST=xxx.a1.typesense.net # your Typesense Cloud host | |
| TYPESENSE_PORT=443 | |
| TYPESENSE_PROTOCOL=https | |
| TYPESENSE_API_KEY=your-typesense-api-key | |
| # Other SpoonMe config/env you may already use locally | |
| # S3 configs, etc., e.g.: | |
| # AWS_ACCESS_KEY_ID=... | |
| # AWS_SECRET_ACCESS_KEY=... | |
| # S3_BUCKET_NAME=... | |
| # S3_REGION=... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment