diff --git a/playbooks/prod_web.yml b/playbooks/prod_web.yml index 939a75b..57dd194 100755 --- a/playbooks/prod_web.yml +++ b/playbooks/prod_web.yml @@ -91,8 +91,8 @@ include_tasks: tasks/{{ item }} with_items: - app/redis.yml + - web/jenkins.yml - web/libreddit.yml - - web/peertube.yml - web/pleroma.yml tags: [ always ] roles: @@ -106,13 +106,25 @@ ingress_servers: - name: cowfee.moe proxy_pass: http://pleroma:4000 - - name: tube.cowfee.moe - proxy_pass: http://peertube:9000 - name: lr.cowfee.moe directives: - "access_log /dev/null" - "error_log /dev/null" proxy_pass: http://libreddit:8080 + - name: jenkins.desu.ltd + proxy_pass: http://jenkins:8080 + locations: + - location: | + ~ "^/static/[0-9a-fA-F]{8}\/(.*)$" + contents: | + rewrite "^/static/[0-9a-fA-F]{8}\/(.*)" /$1 last; + - location: "/userContent" + contents: | + root /data/jenkins/home/; + if (!-f $request_filename) { + rewrite (.*) /$1 last; + break; + } tags: [ web, docker, ingress ] - hosts: web3.dallas.mgmt.desu.ltd module_defaults: diff --git a/playbooks/tasks/web/jenkins.yml b/playbooks/tasks/web/jenkins.yml new file mode 100644 index 0000000..eae1621 --- /dev/null +++ b/playbooks/tasks/web/jenkins.yml @@ -0,0 +1,19 @@ +# vim:ft=ansible: +- name: docker deploy jenkins + docker_container: + name: jenkins + image: jenkins/jenkins:jdk11 +# Uncomment me for inbound agent connections +# Otherwise, use 8080 for the web UI +# ports: +# - 50000:50000 + env: + JAVA_OPTS: "-Dhudson.footerURL=https://jenkins.desu.ltd" + networks: + - name: web + aliases: [ "jenkins" ] + volumes: + - /data/jenkins/home:/var/jenkins_home + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + tags: [ docker, jenkins ]