Initial import: KeepNote service (dcntrlized-auth consumer)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
services:
|
||||
keepnote-service:
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
image: keepnote
|
||||
container_name: keepnote
|
||||
networks:
|
||||
- dcntrlized_net
|
||||
ports:
|
||||
- "8081:8080"
|
||||
- "9090:90"
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:@dcntrlized-db:5432/dcntrlized
|
||||
- AUTH_SERVICE_URL=http://dcntrlized-auth:8080
|
||||
depends_on:
|
||||
- migrate
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
migrate:
|
||||
image: postgres:16-alpine
|
||||
container_name: keepnote-migrate
|
||||
labels:
|
||||
org.dcntrlized.oneoff: "true"
|
||||
networks:
|
||||
- dcntrlized_net
|
||||
volumes:
|
||||
- ./database/migrations:/migrations:ro
|
||||
environment:
|
||||
- PGHOST=dcntrlized-db
|
||||
- PGPORT=5432
|
||||
- PGUSER=postgres
|
||||
- PGPASSWORD=
|
||||
- PGDATABASE=dcntrlized
|
||||
command: >
|
||||
sh -c 'until pg_isready -h dcntrlized-db -U postgres -d dcntrlized; do sleep 2; done;
|
||||
for f in /migrations/*.sql; do [ -f "$$f" ] || continue; echo "Applying $$f"; psql -v ON_ERROR_STOP=1 -d dcntrlized -f "$$f" || exit 1; done'
|
||||
|
||||
networks:
|
||||
dcntrlized_net:
|
||||
external: true
|
||||
Reference in New Issue
Block a user