end-to-end CI to match containerization on rest of adipu_server
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
All checks were successful
Deploy to Server / deploy (push) Successful in 18s
This commit is contained in:
75
docker-compose.yml
Normal file
75
docker-compose.yml
Normal file
@@ -0,0 +1,75 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-blinds}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-blinds_db}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-blinds} -d ${POSTGRES_DB:-blinds_db}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 256M
|
||||
|
||||
# MongoDB is only needed by Agenda for the job queue. Lives entirely inside
|
||||
# this compose project; no host port exposure.
|
||||
mongo:
|
||||
image: mongo:7
|
||||
restart: unless-stopped
|
||||
command: ["--bind_ip_all", "--quiet", "--logpath", "/dev/null"]
|
||||
volumes:
|
||||
- mongo_data:/data/db
|
||||
healthcheck:
|
||||
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 384M
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.backend
|
||||
args:
|
||||
- NODE_VERSION=${NODE_VERSION:-22-alpine}
|
||||
restart: unless-stopped
|
||||
env_file: ./.env
|
||||
environment:
|
||||
# Internal service-name DNS. Override anything in .env that pointed at
|
||||
# 127.0.0.1 — those values were for the host-postgres era.
|
||||
PGHOST: postgres
|
||||
PGPORT: 5432
|
||||
PGUSER: ${POSTGRES_USER:-blinds}
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD}
|
||||
PGDATABASE: ${POSTGRES_DB:-blinds_db}
|
||||
MONGO_URI: mongodb://mongo:27017/myScheduledApp
|
||||
PORT: ${PORT:-3002}
|
||||
# Bind only on host loopback — Cloudflare Tunnel proxies blindmaster.wahwa.com here.
|
||||
ports:
|
||||
- "127.0.0.1:${PORT:-3002}:${PORT:-3002}"
|
||||
volumes:
|
||||
# Set APNS_P8_HOST_PATH in .env to the actual filename, e.g. ./AuthKey_A7ASKB9B7V.p8
|
||||
- ${APNS_P8_HOST_PATH:-./AuthKey.p8}:${APNS_P8_PATH:-/app/AuthKey.p8}:ro
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
mongo:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 256M
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
mongo_data:
|
||||
Reference in New Issue
Block a user