---
- hosts: lund.fsfeurope.org
  remote_user: root

  tasks:
    - name: build the pmpc container
      command: docker build --no-cache=true -t pmpc https://git.fsfe.org/pmpc/website.git

    - name: run pmpc
      docker_container:
        name: pmpc
        image: pmpc
        state: started
        restart: yes
        env:
          HUGO_BASE_URL: https://publiccode.eu/
          VIRTUAL_HOST: publiccode.eu
          LETSENCRYPT_HOST: publiccode.eu
          LETSENCRYPT_EMAIL: jonas@fsfe.org
        volumes:
          - "/srv/pmpc-signatures:/usr/share/blog/data/signatures:rw"
