62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
# /work/podman/bigdata-server/docker-compose.yml
|
|
version: '3.8'
|
|
|
|
services:
|
|
# 1. Base Server 서비스 (Bigdata용)
|
|
base-server:
|
|
image: localhost/base-server:latest
|
|
container_name: bigdata_server # <<< 변경: 컨테이너 이름 변경
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
- DB_HOST=postgres
|
|
- DB_PORT=5432
|
|
- DB_USER=spacs
|
|
- DB_PASSWORD=scaps
|
|
- DB_NAME=spacs
|
|
ports:
|
|
- "14020:22" # <<< 변경: SSH 포트 (예: 14010 -> 14020)
|
|
- "14022:14022" # <<< 변경: 서비스 포트 (예: 14012 -> 14022)
|
|
- "14023:14023" # <<< 변경: 서비스 포트
|
|
- "14025:1105" # <<< 변경: 서비스 포트
|
|
- "14024:1104" # <<< 변경: 서비스 포트
|
|
- "14026:14026" # <<< 변경: 서비스 포트
|
|
volumes:
|
|
- ./ssdoctors:/home/ssdoctors:Z
|
|
- ./system/usr_local:/usr/local:Z
|
|
- ./system/etc:/etc:Z
|
|
- ./data/workspace:/workspace:Z
|
|
networks:
|
|
- app-network
|
|
|
|
# 2. PostgreSQL 서비스 (Bigdata용)
|
|
postgres:
|
|
build:
|
|
context: .
|
|
dockerfile: postgres.Containerfile
|
|
container_name: bigdata_postgresql # <<< 변경: 컨테이너 이름 변경
|
|
restart: unless-stopped
|
|
command: postgres -c shared_preload_libraries=pg_cron -c cron.database_name=spacs
|
|
environment:
|
|
POSTGRES_USER: spacs
|
|
POSTGRES_PASSWORD: scaps
|
|
POSTGRES_DB: spacs
|
|
volumes:
|
|
- ./data/postgresql:/var/lib/postgresql/data:Z # 이 경로는 bigdata-server/data/postgresql을 가리키게 됨
|
|
ports:
|
|
- "15433:5432" # <<< 변경: PostgreSQL 접속 포트 (예: 15432 -> 15433)
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U spacs -d spacs"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|