40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
|
|
# Info
|
|
appServerInfo:
|
|
image: node:20-alpine
|
|
container_name: appServerInfo
|
|
working_dir: /app
|
|
command: sh -c "npm install && node server.js"
|
|
volumes:
|
|
- /home/chk/Documents/appServerInfo/app:/app
|
|
- /home/chk/Documents/appServerInfo/app/checks:/app/checks
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
ports:
|
|
- "3030:3000"
|
|
depends_on:
|
|
- appServerInfoDB
|
|
environment:
|
|
DB_HOST: appServerInfoDB
|
|
DB_USER: postgres
|
|
DB_PASSWORD: postgres
|
|
DB_NAME: infodb
|
|
DB_PORT: 5432
|
|
restart: unless-stopped
|
|
|
|
appServerInfoDB:
|
|
image: postgres:16-alpine
|
|
container_name: appServerInfoDB
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: infodb
|
|
volumes:
|
|
- /home/chk/Documents/appServerInfo/pgdata:/var/lib/postgresql/data
|
|
- /home/chk/Documents/appServerInfo/db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
ports:
|
|
- "5432:5432"
|
|
|