# /work/podman/bigdata-server/docker-compose.yml version: '3.8' services: # 1. Base Server 서비스 (Bigdata용) base-server: build: context: . dockerfile: Containerfile # image: localhost/base-server:latest container_name: bigdata_server # <<< 변경: 컨테이너 이름 변경 restart: unless-stopped #privileged: true runtime: nvidia # user: "${UID}:${GID}" #labels: # ✅ 이 부분을 추가합니다. # - "io.podman.compose.runtime=nvidia" depends_on: - postgres #condition: service_healthy # deploy: #resources: #reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu] environment: - NVIDIA_VISIBLE_DEVICES=all # ✅ GPU를 사용하기 위한 필수 환경 변수 - TZ=Asia/Seoul - DB_HOST=localhost - DB_PORT=15433 - DB_USER=spacs - DB_PASSWORD=scaps - DB_NAME=spacs #devices: #- /dev/nvidia0:/dev/nvidia0 #- /dev/nvidiactl:/dev/nvidiactl #- /dev/nvidia-uvm:/dev/nvidia-uvm #security_opt: #- label=disable network_mode: "host" #cap_add: # - SYS_PTRACE volumes: - ./ssdoctors:/home/ssdoctors:Z # - ./system/usr_local:/usr/local:Z #- ./system/etc:/etc:Z - ./data/workspace:/workspace:Z # 2. PostgreSQL 서비스 (Bigdata용) postgres: build: context: . dockerfile: postgres.Containerfile container_name: bigdata_postgresql # <<< 변경: 컨테이너 이름 변경 restart: unless-stopped #pull_policy: always #user: '70:70' init: true #privileged: true network_mode: "host" 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 #healthcheck: # test: ["CMD-SHELL", "pg_isready -U spacs -d spacs -p 15433"] # interval: 10s # timeout: 5s # retries: 5