diff --git a/compose/scribe/compose.yml b/compose/scribe/compose.yml new file mode 100644 index 0000000..ea1f6d7 --- /dev/null +++ b/compose/scribe/compose.yml @@ -0,0 +1,17 @@ + +version: "3.8" + +services: + scribe: + image: registry.gitlab.com/lomanic/scribe-binaries:latest + restart: always + container_name: "scribe" + ports: + - 127.0.0.1:6265:8006 + environment: + - SCRIBE_PORT=8006 + - SCRIBE_HOST=0.0.0.0 + - APP_DOMAIN=scribe.projectsegfau.lt + - LUCKY_ENV=production + - PORT=8006 + - SECRET_KEY_BASE=uVN1eX+RQu7HVuIC0IoPonoy9Lk4rdNV0byjHjzo76M= diff --git a/compose/teddit/docker-compose.yml b/compose/teddit/docker-compose.yml new file mode 100644 index 0000000..30a354a --- /dev/null +++ b/compose/teddit/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3.8" + +services: + + teddit: + container_name: teddit + image: teddit/teddit:latest + environment: + - DOMAIN=teddit.projectsegfau.lt + - USE_HELMET=true + - USE_HELMET_HSTS=true + - TRUST_PROXY=true + - REDIS_HOST=teddit-redis + ports: + - "127.0.0.1:6974:8080" + networks: + - teddit_net + healthcheck: + test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"] + interval: 1m + timeout: 3s + depends_on: + - teddit-redis + restart: always + + teddit-redis: + container_name: teddit-redis + image: redis:6.2.5-alpine + command: redis-server + environment: + - REDIS_REPLICATION_MODE=master + networks: + - teddit_net + restart: always + +networks: + teddit_net: diff --git a/playbooks/caddy.yaml b/playbooks/caddy.yaml index 2853dc3..dccdcec 100644 --- a/playbooks/caddy.yaml +++ b/playbooks/caddy.yaml @@ -6,3 +6,5 @@ caddy_config: "{{ lookup('template', '../templates/Caddyfile.j2') }}" caddy_user: "caddy" caddy_home: "/var/lib/caddy" + # Static weekly builds of caddy with rfc2136 + caddy_url_base: "https://cb.projectsegfau.lt/api/download" diff --git a/playbooks/docker.yaml b/playbooks/docker.yaml new file mode 100644 index 0000000..0b6588d --- /dev/null +++ b/playbooks/docker.yaml @@ -0,0 +1,27 @@ +--- +- hosts: all + tasks: + - name: Remove old compose files + ansible.builtin.file: + path: /opt/docker/{{item}} + state: absent + with_fileglob: + - "/home/arya/projects/ansibletest/compose/*" + - name: Copy compose files + copy: + src: /home/arya/projects/ansibletest/compose/{{item}} + dest: /opt/docker/ + with_fileglob: + - "/home/arya/projects/ansibletest/compose/*" + - name: stop compose + docker_compose: + project_src: /opt/docker/{{item}} + state: absent + with_fileglob: + - "/home/arya/projects/ansibletest/compose/*" + - name: start compose + docker_compose: + project_src: /opt/docker/{{item}} + state: present + with_fileglob: + - "/home/arya/projects/ansibletest/compose/*"