Files
Reactive_Resume/packages/reactive-resume-personal-direct/compose.yml

98 lines
2.5 KiB
YAML

name: reactive-resume-personal
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- resume_net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 10
reactive-resume:
image: amruthpillai/reactive-resume@sha256:b760446c4301af067e7d595537a877e378363aa6ce921b7349e62983621826aa
restart: unless-stopped
entrypoint: ["/bin/sh", "/opt/reactive-resume-patches/reactive-resume-entrypoint.sh"]
env_file:
- .env
ports:
- "${LOCAL_BIND_IP}:${LOCAL_APP_PORT}:3000"
volumes:
- reactive_resume_data:/app/data
- ./patches/reactive-resume-runtime-patch.sh:/opt/reactive-resume-patches/reactive-resume-runtime-patch.sh:ro
- ./patches/reactive-resume-entrypoint.sh:/opt/reactive-resume-patches/reactive-resume-entrypoint.sh:ro
networks:
- resume_net
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/api/health').then((r) => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1));",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
seed:
image: postgres:16-alpine
restart: "no"
user: "0:0"
entrypoint: ["/bin/sh"]
command:
- -c
- |
set -eu
mkdir -p /app/data/uploads
cp -a /seed/uploads/. /app/data/uploads/
chown -R 1000:1000 /app/data/uploads || true
psql -h postgres -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" -v ON_ERROR_STOP=1 -f /seed/seed.sql
env_file:
- .env
environment:
PGPASSWORD: ${POSTGRES_PASSWORD}
volumes:
- reactive_resume_data:/app/data
- ./seed:/seed:ro
networks:
- resume_net
depends_on:
postgres:
condition: service_healthy
reactive-resume:
condition: service_healthy
frpc:
image: fatedier/frpc:v0.68.0
restart: unless-stopped
command: ["-c", "/etc/frp/frpc.yaml"]
volumes:
- ./frpc.yaml:/etc/frp/frpc.yaml:ro
networks:
- resume_net
depends_on:
seed:
condition: service_completed_successfully
networks:
resume_net:
driver: bridge
volumes:
postgres_data:
reactive_resume_data: