1.8 KiB · text History 0aa3d5d
# Single-node deployment using the `:standalone` image variant.
# site_encrypt handles ACME (Let's Encrypt) directly — make sure ports
# 80 and 6697 are reachable from the public internet for the HTTP-01
# challenge and TLS IRC respectively.
#
#   cp .env.example .env  &&  edit values
#   docker compose up -d
#
# Then point an IRC client at $HOST:6697 (TLS) or $HOST:6667 (plain).

services:
  postgres:
    image: docker.io/library/postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_DB: ircd
      POSTGRES_USER: ircd
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - postgres-data:/var/lib/postgresql/data

  ircd:
    image: registry.example.com/oh_my_ex_oh_ircd:standalone-master
    restart: unless-stopped
    depends_on: [postgres]
    ports:
      - "80:4000"     # HTTP — required for ACME HTTP-01 challenge
      - "6667:6667"   # IRC plain
      - "6697:6697"   # IRC over TLS
    environment:
      PHX_SERVER: "true"
      PHX_HOST: ${HOSTNAME}
      PORT: "4000"
      DATABASE_URL: ecto://ircd:${POSTGRES_PASSWORD}@postgres:5432/ircd
      SECRET_KEY_BASE: ${SECRET_KEY_BASE}
      # IRC config
      IRC_PORT: "6667"
      IRC_SERVER_NAME: ${HOSTNAME}
      IRC_NETWORK_NAME: ${NETWORK_NAME:-OhMyExOhIRC}
      IRC_ALLOW_ANONYMOUS: "false"
      IRC_TLS_ENABLED: "true"
      IRC_TLS_PORT: "6697"
      # Set to "true" to expose the in-browser /webirc client.
      WEBIRC_ENABLED: "false"
      # ACME (consumed by the :standalone build's runtime.exs ACME block).
      ACME_DOMAINS: ${HOSTNAME}
      ACME_EMAILS: ${ACME_EMAIL}
      ACME_DIRECTORY_URL: https://acme-v02.api.letsencrypt.org/directory
      ACME_DB_FOLDER: /var/lib/oh_my_ex_oh_ircd/site_encrypt
    volumes:
      - site-encrypt-db:/var/lib/oh_my_ex_oh_ircd/site_encrypt

volumes:
  postgres-data:
  site-encrypt-db: