Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.7 kB
1
Indexable
Never
version: '3'
services:
  vpn:
    image: azinchen/nordvpn:latest
    container_name: ${VPN_CONTAINER}
    restart: unless-stopped
    ports:
      - ${VPN_PORT}:${VPN_PORT}
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=${VPN_USER}
      - PASS=${VPN_PASSWORD}
      - COUNTRY={VPN_COUNTRY}
      - GROUP=${VPN_CATEGORY}
      - RANDOM_TOP=${VPN_RANDOM_TOP}
      - RECREATE_VPN_CRON=${RECREATE_VPN_CRON}
      - NETWORK=${VPN_NETWORK}
      - PROTOCOL=${VPN_PROTOCOL}
      - OPENVPN_OPTS=--mute-replay-warnings

  splash:
    image: scrapinghub/splash
    container_name: ${SPLASH_CONTAINER}
    restart: unless-stopped
    command: --max-timeout 3600
    network_mode: service:vpn
    depends_on:
      - vpn

  mongodb:
    image: mongo:latest
    container_name: ${MONGO_CONTAINER}
    restart: unless-stopped
    ports:
      - ${MONGO_PORT}:${MONGO_PORT}
    environment:
      # - MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE}
      - MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
      - MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
    volumes:
      - "./storage/mongodb:/data/db"
    networks:
      - crawler-network

  postgresdb:
    image: postgres:latest
    container_name: ${POSTGRES_CONTAINER}
    restart: unless-stopped
    ports:
      - "${POSTGRES_PORT}:${POSTGRES_PORT}"
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      - "./storage/postgresdb:/var/lib/postgresql/data"
    networks:
      - crawler-network
networks:
  crawler-network: null