services:
  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: wiki
      POSTGRES_PASSWORD: wikijsrocks
      POSTGRES_USER: wikijs
    logging:
      driver: "none"
    restart: always
    volumes:
      - db-data:/var/lib/postgresql/data
    networks:
      - icontainer-network
  wiki:
    image: ghcr.io/requarks/wiki:2
    depends_on:
      - db
    environment:
      DB_TYPE: postgres
      DB_HOST: db
      DB_PORT: 5432 # Porta interna do PostgreSQL
      DB_USER: wikijs
      DB_PASS: wikijsrocks
      DB_NAME: wiki
    restart: always
    container_name: ${CONTAINER_NAME}
    ports:
      - ${PANEL_APP_PORT_HTTP}:3000
    networks:
      - icontainer-network
    labels:
      createdBy: "Apps"
      
networks:
  icontainer-network:
    external: true

volumes:
  db-data: