version: '3'
services:
  #Web Service
  app-pddikti:
    build:
      context: .
      dockerfile: Dockerfile
    image: pddikti/new_feeder
    container_name: app-pddikti
    restart: unless-stopped
    tty: true
    environment:
      TZ: "Asia/Jakarta"
      SERVICE_NAME: "app"
      SERVICE_TAGS: "1.0.6b"
      PGHOST: "localhost"
      PGPORT: 54333
    volumes:
      - './app:/app'
      - './prefill_pddikti:/prefill_pddikti'
      - './nginx/nginx.conf:/etc/nginx/nginx.conf'
      - './nginx/logs/access.log:/var/log/nginx/access.log'
      - './nginx/logs/error.log:/var/log/nginx/error.log'
    networks:
      - app-network
    ports:
      - "8100:8100"
      - "3003:3003"
    depends_on:
      - db-pddikti

  #PgSQL Service
  db-pddikti:
    image: postgres:12
    container_name: db-pddikti
    environment:
      TZ: "Asia/Jakarta"
    restart: unless-stopped
    tty: true
    ports:
      - "54333:54333"
    volumes:
      - './pgsql/data:/var/lib/postgresql/data'
    networks:
      - app-network

#Docker Networks
networks:
  app-network:
    driver: bridge
    ipam:
      driver: default
      config:
      - subnet: 192.167.150.0/24
