yaml work

This commit is contained in:
chk
2026-02-15 22:00:47 +01:00
parent 58b490b4f1
commit cb1e16c7ff

View File

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