Skip to content
Snippets Groups Projects
docker-compose.yml 2.18 KiB
Newer Older
    name: weekpad-db
    name: deleted-pads-week
    name: etherpad-api-week-key
    name: etherpad_week-queries-database
    name: etherpad_week-dpad-queries-app
    container_name: etherpad_week_db
    env_file: ./secrets/etherpad-week-db.secrets
    networks:
      - app-db
    restart: unless-stopped

  app:
    image: registry.picasoft.net/pica-etherpad:1.8.6
    build: ..
    container_name: etherpad_week_app
    env_file: ./secrets/etherpad-week-app.secrets
    volumes:
      - ./settings.json:/opt/etherpad-lite/settings.json:ro
      - api-key:/mountedAPIkey
    command: ["--apikey", "/mountedAPIkey/APIKEY.txt"]
    labels:
      traefik.http.routers.etherpad-app.entrypoints: websecure
      traefik.http.routers.etherpad-app.rule: Host(`week.pad.picasoft.net`)
      traefik.http.services.etherpad-app.loadbalancer.server.port: 8080
      traefik.enable: true
    environment:
      DB_HOST: "etherpad_week_db"
      TITLE: "Picapad Hebdo"
      TRUST_PROXY: "true"
    networks:
      - proxy
      - app-db
      - dpad-app
    depends_on:
      - db
    restart: unless-stopped

  delete-pad-after-delay:
    image: registry.picasoft.net/pica-etherpad-delete-after-delay:picasoft-docker.1.0
    container_name: etherpad_delete-pad-after-delay
    build:
      context: https://gitlab.utc.fr/picasoft/projets/delete-pad-after-delay.git#picasoft-docker.1.0
    volumes:
      - api-key:/mountedAPIkey:ro
      - deleted-pads:/opt/etherpad-lite/deleted_pads
    networks:
      - dpad-app
    environment:
      # Must match app container name and port
      URL: "http://etherpad_week_app:8080"
      # In seconds (14 days). MUST be COHERENT with settings.json
      DEL: 1209600
      # Same mount point than deleted-pads
      DIR: "/opt/etherpad-lite/deleted_pads"
      # Same mount point than api-key + APIKEY.txt
      APIKEY_PATH: "/mountedAPIkey/APIKEY.txt"
    depends_on:
      - app
    restart: unless-stopped