mirror of
https://github.com/monochrome-music/monochrome.git
synced 2026-10-22 19:12:56 -05:00
the [11f66c1 "debloat root"](https://github.com/monochrome-music/monochrome/commit/11f66c1a28d9d13b54545b5224344c621d3fa8c9) move relocated the dockerfiles and compose file into
docker/ but left build paths pointing at the old layout, so
`docker compose up -d` failed to find nginx.conf.
- set `context: ..` and `dockerfile: docker/...` on the monochrome and
monochrome-dev services, and bind-mount `..:/app` in dev so the build
and runtime context is the repo root
- copy `bun.lock` instead of the non-existent `package-lock.json` for
the dependency-cache layer
- fix readme instructions to spin up docker compose from new location.
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
services:
|
|
# Production frontend -- always runs
|
|
monochrome:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
args:
|
|
- AUTH_ENABLED=${AUTH_ENABLED}
|
|
- AUTH_SECRET=${AUTH_SECRET}
|
|
- APPWRITE_ENDPOINT=${APPWRITE_ENDPOINT}
|
|
- APPWRITE_PROJECT_ID=${APPWRITE_PROJECT_ID}
|
|
- POCKETBASE_URL=${POCKETBASE_URL}
|
|
- SESSION_MAX_AGE=${SESSION_MAX_AGE}
|
|
container_name: monochrome
|
|
ports:
|
|
- '${MONOCHROME_PORT:-3000}:4173'
|
|
restart: unless-stopped
|
|
networks:
|
|
- monochrome-network
|
|
healthcheck:
|
|
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:4173/']
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 5s
|
|
|
|
# PocketBase backend -- only starts with: docker compose --profile pocketbase up -d
|
|
pocketbase:
|
|
image: ghcr.io/muchobien/pocketbase:latest
|
|
container_name: monochrome-pocketbase
|
|
profiles:
|
|
- pocketbase
|
|
restart: unless-stopped
|
|
environment:
|
|
PB_ADMIN_EMAIL: ${PB_ADMIN_EMAIL:-admin@example.com}
|
|
PB_ADMIN_PASSWORD: ${PB_ADMIN_PASSWORD:-changeme}
|
|
TZ: ${TZ:-UTC}
|
|
ports:
|
|
- '${POCKETBASE_PORT:-8090}:8090'
|
|
volumes:
|
|
- pb_data:/pb_data
|
|
- pb_public:/pb_public
|
|
- pb_hooks:/pb_hooks
|
|
command: serve --http=0.0.0.0:8090
|
|
healthcheck:
|
|
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:8090/api/health']
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- monochrome-network
|
|
|
|
# Development server -- only starts with: docker compose --profile dev up -d
|
|
monochrome-dev:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile.dev
|
|
container_name: monochrome-dev
|
|
profiles:
|
|
- dev
|
|
ports:
|
|
- '${MONOCHROME_DEV_PORT:-5173}:5173'
|
|
volumes:
|
|
- ..:/app
|
|
- /app/node_modules
|
|
command: npm run dev -- --host 0.0.0.0
|
|
networks:
|
|
- monochrome-network
|
|
|
|
networks:
|
|
monochrome-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
pb_data:
|
|
pb_public:
|
|
pb_hooks:
|