Podman_compose_BigData/docker-compose.yml.gpu
2025-10-16 21:15:12 +09:00

75 lines
1.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#version: "3.9"
services:
base-server:
build:
context: .
dockerfile: Containerfile
#network: host
container_name: bigdata_server
restart: unless-stopped
network_mode: "host"
# podman-compose에서 동작하는 예시 방식
devices:
- "nvidia.com/gpu=all"
labels:
- "run.oci.runtime.podman.devices=all"
security_opt:
- label=disable # 또는 SELinux 사용시 제거하고 :Z 사용
- seccomp=unconfined
environment:
- NVIDIA_VISIBLE_DEVICES=all
- TZ=Asia/Seoul
- DB_HOST=localhost
- DB_PORT=15433
- DB_USER=spacs
- DB_PASSWORD=scaps
- DB_NAME=spacs
volumes:
- ./ssdoctors:/home/ssdoctors # (아래 node_modules 처리 참고)
- ./data/workspace:/workspace
# 2. PostgreSQL 서비스 (Bigdata용)
postgres:
build:
context: .
dockerfile: postgres.Containerfile
# network: host
container_name: bigdata_postgresql # <<< 변경: 컨테이너 이름 변경
restart: unless-stopped
#pull_policy: always
#user: '70:70'
init: true
privileged: true
network_mode: "host"
ports:
- "15433:5432"
command: postgres -c port=15433 -c shared_preload_libraries=pg_cron -c cron.database_name=spacs
environment:
- TZ=Asia/Seoul
- POSTGRES_USER=spacs
- POSTGRES_PASSWORD=scaps
- POSTGRES_DB=spacs
- PGPORT=15433
volumes:
- ./data/postgresql:/var/lib/postgresql/data:Z
security_opt:
- label=disable
- seccomp=unconfined
#healthcheck:
# test: ["CMD-SHELL", "pg_isready -U spacs -d spacs -p 15433"]
# interval: 10s
# timeout: 5s
# retries: 5
volumes:
# (필요시 node_modules용 named volume 추가 아래 참고)