Docker-Images bauen und veroeffentlichen / build-and-push (push) Failing after 1m32s
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
# Lokale Entwicklungsumgebung.
|
|
#
|
|
# docker compose up -d db mailpit nur Datenbank + Test-Postfach
|
|
# docker compose --profile app up -d zusaetzlich die gebaute Anwendung
|
|
#
|
|
# Mailpit faengt alle Mails ab (Weboberflaeche http://localhost:8025):
|
|
# MAIL_TRANSPORT=smtp, SMTP_HOST=localhost, SMTP_PORT=1025.
|
|
# Ohne Docker: pnpm db:dev (eingebettetes PostgreSQL) + MAIL_TRANSPORT=file.
|
|
services:
|
|
db:
|
|
image: postgres:18.1-alpine
|
|
environment:
|
|
POSTGRES_USER: artista
|
|
POSTGRES_PASSWORD: artista-dev
|
|
POSTGRES_DB: artista
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
volumes:
|
|
- db-data:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U artista"]
|
|
interval: 5s
|
|
retries: 10
|
|
|
|
mailpit:
|
|
image: axllent/mailpit:v1.27
|
|
ports:
|
|
- "127.0.0.1:8025:8025"
|
|
- "127.0.0.1:1025:1025"
|
|
|
|
migrate:
|
|
profiles: ["app"]
|
|
build: { context: ., target: tools }
|
|
environment:
|
|
DATABASE_URL: postgresql://artista:artista-dev@db:5432/artista
|
|
depends_on:
|
|
db: { condition: service_healthy }
|
|
|
|
app:
|
|
profiles: ["app"]
|
|
build: { context: ., target: runner }
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql://artista:artista-dev@db:5432/artista
|
|
SMTP_HOST: mailpit
|
|
SMTP_PORT: "1025"
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
volumes:
|
|
- ./media:/app/media:ro
|
|
depends_on:
|
|
migrate: { condition: service_completed_successfully }
|
|
|
|
volumes:
|
|
db-data:
|