Ansible playbook to deploy reverse proxy and Docker services on lund.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rp.deploy.yml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ---
  2. - hosts: lund.fsfeurope.org
  3. remote_user: root
  4. tasks:
  5. - name: build a proxy for the tools server
  6. command: docker build -t proxy-tools --build-arg DESTINATION_HOST=holte.fsfeurope.org https://git.fsfe.org/jonas/fsfe-proxy.git
  7. - name: build the rp image
  8. command: docker build -t rp https://git.fsfe.org/jonas/fsfe-rp.git
  9. - name: build the rple image
  10. command: docker build -t rple https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion.git
  11. - name: run the tools proxy
  12. docker_container:
  13. name: proxy-tools
  14. image: proxy-tools
  15. state: started
  16. restart: yes
  17. env:
  18. VIRTUAL_HOST: tools.fsfe.org
  19. LETSENCRYPT_HOST: tools.fsfe.org
  20. LETSENCRYPT_EMAIL: jonas@fsfe.org
  21. - name: run the reverse proxy
  22. docker_container:
  23. name: rp
  24. image: rp
  25. state: started
  26. restart: yes
  27. ports:
  28. - "80:80"
  29. - "443:443"
  30. env:
  31. ENABLE_IPV6: true
  32. volumes:
  33. - "/var/run/docker.sock:/tmp/docker.sock:ro"
  34. - "/srv/nginx-rp/certs:/etc/nginx/certs:ro"
  35. - "/srv/nginx-rp/vhost:/etc/nginx/vhost.d"
  36. - "/srv/nginx-rp/html:/usr/share/nginx/html"
  37. labels:
  38. "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy": "true"
  39. - name: run the letsencrypt companion
  40. docker_container:
  41. name: rple
  42. image: rple
  43. state: started
  44. restart: yes
  45. volumes_from:
  46. - rp
  47. volumes:
  48. - "/srv/nginx-rp/vhost:/etc/nginx/vhost.d"
  49. - "/srv/nginx-rp/certs:/etc/nginx/certs:rw"
  50. - "/srv/nginx-rp/html:/usr/share/nginx/html"
  51. - "/var/run/docker.sock:/var/run/docker.sock:ro"