fix: Simplify docker-compose and fix build context
This commit is contained in:
parent
d8be8109d1
commit
aca6c578f4
2 changed files with 7 additions and 80 deletions
|
|
@ -1,23 +0,0 @@
|
||||||
# Dependencies
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# Git
|
|
||||||
.git
|
|
||||||
.github
|
|
||||||
|
|
||||||
# IDE
|
|
||||||
.idea
|
|
||||||
.vscode
|
|
||||||
|
|
||||||
# OS
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Environment
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
|
|
||||||
# Documentation
|
|
||||||
*.md
|
|
||||||
|
|
||||||
# Docker (but keep our Dockerfile)
|
|
||||||
docker-compose*.yml
|
|
||||||
|
|
@ -2,77 +2,27 @@ services:
|
||||||
# Production frontend -- always runs
|
# Production frontend -- always runs
|
||||||
monochrome:
|
monochrome:
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ../../
|
||||||
dockerfile: docker/Dockerfile
|
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
|
container_name: monochrome
|
||||||
ports:
|
ports:
|
||||||
- '${MONOCHROME_PORT:-3000}:4173'
|
- '${MONOCHROME_PORT:-3000}:4173'
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- monochrome-network
|
- 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
|
# CORS Proxy for audio streaming
|
||||||
pocketbase:
|
cors-proxy:
|
||||||
image: ghcr.io/muchobien/pocketbase:latest
|
image: nginx:alpine
|
||||||
container_name: monochrome-pocketbase
|
container_name: cors-proxy
|
||||||
profiles:
|
|
||||||
- pocketbase
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
|
||||||
PB_ADMIN_EMAIL: ${PB_ADMIN_EMAIL:-admin@example.com}
|
|
||||||
PB_ADMIN_PASSWORD: ${PB_ADMIN_PASSWORD:-changeme}
|
|
||||||
TZ: ${TZ:-UTC}
|
|
||||||
ports:
|
ports:
|
||||||
- '${POCKETBASE_PORT:-8090}:8090'
|
- '8081:80'
|
||||||
volumes:
|
volumes:
|
||||||
- pb_data:/pb_data
|
- ./cors-proxy.conf:/etc/nginx/nginx.conf:ro
|
||||||
- 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:
|
networks:
|
||||||
- monochrome-network
|
- monochrome-network
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
monochrome-network:
|
monochrome-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
|
||||||
pb_data:
|
|
||||||
pb_public:
|
|
||||||
pb_hooks:
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue