86 lines
1.9 KiB
YAML
86 lines
1.9 KiB
YAML
---
|
|
|
|
services:
|
|
client:
|
|
container_name: client
|
|
image: node:20.17-bullseye-slim
|
|
ports:
|
|
- "5000:5000"
|
|
entrypoint: sh -c "npm i --no-update-notifier && npm start"
|
|
user: root
|
|
volumes:
|
|
- "./client:/app"
|
|
working_dir: /app
|
|
environment:
|
|
LOG_LEVEL: debug
|
|
healthcheck:
|
|
test: timeout 10s bash -c 'true > /dev/tcp/127.0.0.1/5000'
|
|
interval: 1m30s
|
|
timeout: 15s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
server:
|
|
container_name: server
|
|
depends_on:
|
|
db:
|
|
condition: service_started
|
|
environment:
|
|
POSTGRES_DB: tasknote
|
|
POSTGRES_HOST: db
|
|
POSTGRES_USER: tasknoteuser
|
|
POSTGRES_PASSWORD: default
|
|
POSTGRES_PORT: 5435
|
|
ports:
|
|
- "8585:8585"
|
|
- "5005:5005"
|
|
image: maven:3.9.9-eclipse-temurin-17
|
|
entrypoint: sh -c './encora-cert.sh'
|
|
working_dir: /app
|
|
volumes:
|
|
- "./java-api:/app"
|
|
- $HOME/zscaler-certs:/certs
|
|
healthcheck:
|
|
test: curl -f http://localhost:8585/actuator/health | grep '"status":"UP"'
|
|
interval: 1m30s
|
|
timeout: 15s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
db:
|
|
container_name: db
|
|
image: postgres:15.8-bookworm
|
|
environment:
|
|
POSTGRES_DB: tasknote
|
|
POSTGRES_USER: tasknoteuser
|
|
POSTGRES_PASSWORD: default
|
|
POSTGRES_PORT: 5435
|
|
PGDATA: /tmp
|
|
volumes:
|
|
- "./data:/tmp"
|
|
ports:
|
|
- "5435:5432"
|
|
healthcheck:
|
|
test: psql -q -U $${POSTGRES_USER} -d $${POSTGRES_DB} -c 'SELECT 1'
|
|
interval: 1m30s
|
|
timeout: 15s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
caddy:
|
|
container_name: caddy
|
|
profiles:
|
|
- "caddy"
|
|
build:
|
|
context: .
|
|
args:
|
|
BUILD: nightly
|
|
ports:
|
|
- "80:5000"
|
|
volumes:
|
|
- "./Caddyfile:/etc/caddy/Caddyfile"
|
|
environment:
|
|
LOG_LEVEL: debug
|
|
healthcheck:
|
|
test: timeout 10s bash -c 'true > /dev/tcp/127.0.0.1/3000'
|