fixes i needed during deployment

This commit is contained in:
Arya 2023-05-29 23:49:16 +08:00
parent ab3522f6d2
commit 1b5054c5f8
Signed by: arya
GPG Key ID: 842D12BDA50DF120
8 changed files with 31 additions and 24 deletions

View File

@ -6,4 +6,4 @@ services:
ports:
- "10416:10416"
volumes:
- "./config.ini:/app/config.ini"
- "./extras.conf:/app/config.ini"

View File

@ -13,4 +13,4 @@ services:
- APP_DOMAIN=scribe.projectsegfau.lt
- LUCKY_ENV=production
- PORT=8006
- SECRET_KEY_BASE={{scribe_secret_key_base}}
- SECRET_KEY_BASE={{scribe_secret_key_base}}

View File

@ -1,4 +1,3 @@
version: 2
services:
watchtower:
image: containrrr/watchtower

View File

@ -1,4 +1,8 @@
---
- name: Create directory for service
file:
path: /opt/docker/{{item}}
state: directory
- name: Copy docker-compose templates for the service
template:
src: ./compose/{{item}}/compose.yml.j2
@ -20,16 +24,16 @@
command:
chdir: "/opt/docker/{{ item }}"
cmd: docker compose pull
when: check_status is changed
when: check_status.changed
- name: "Stop docker service"
command:
chdir: "/opt/docker/{{ item }}"
cmd: docker compose down
when: check_status is changed
when: check_status.changed
- name: "Start docker service"
command:
chdir: "/opt/docker/{{ item }}"
cmd: docker compose up -d --build --remove-orphans
when: check_status is changed
when: check_status.changed

View File

@ -2,11 +2,12 @@
- name: Setup Caddy
hosts: privfrontends
roles:
- role: caddy_ansible.caddy_ansible
- role: caddy-ansible
caddy_systemd_capabilities_enabled: true
caddy_config: "{{ lookup('template', './templates/Caddyfile.j2') }}"
caddy_user: "caddy"
caddy_home: "/var/lib/caddy"
caddy_packages: ["github.com/caddy-dns/rfc2136@master"]
# Static weekly builds of caddy with rfc2136 dns plugin
caddy_url_base: "https://cb.projectsegfau.lt/api/download"
tasks:
@ -14,18 +15,22 @@
copy:
src: "./templates/{{ inventory_hostname }}/"
dest: /etc/caddy/
remote_src: true
directory_mode: true
- name: Restart
service:
name: caddy
enabled: yes
state: restarted
- name: Setup docker compose for privacy frontends
hosts: privfrontends
vars:
docker_services:
- anonymousoverflow
- beatbump
#- beatbump
- breezewiki
- gothub
- gothub-dev
- invidious
#- invidious
- librarian
- libreddit
- nitter
@ -34,8 +39,8 @@
- teddit
- watchtower
non_pizza_docker_services:
- piped
- searxng-docker
#- piped
- searxng
tasks:
#
# community.docker does not support compose 2.0 right now.

View File

@ -134,6 +134,10 @@ proxy.lbry.projectsegfau.lt {
reverse_proxy localhost:3001
import def
}
gothub.dev.projectsegfau.lt gh.dev.psf.lt {
reverse_proxy localhost:1025
import def
}
{% else %}
inv.{{inventory_hostname}}.projectsegfau.lt {
reverse_proxy localhost:7573
@ -260,7 +264,7 @@ pi.{{inventory_hostname}}.psf.lt {
}
{% endif %}
lbry.{{inventory_hostname}}.projectsegfau.lt lbry.projectsegfau.lt {
reverse_proxy :7269
reverse_proxy :3550
import def
import torloc lbry
import i2ploc pjsf7uucpqf2crcmfo3nvwdmjhirxxjfyuvibdfp5x3af2ghqnaa.b32.i2p
@ -392,4 +396,4 @@ search.{{inventory_hostname}}.projectsegfau.lt s.psf.lt s.{{inventory_hostname}}
}
}
{% endif %}
include ./*.Caddyfile
import ./*.Caddyfile

View File

@ -1,10 +1,3 @@
http://pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion http://pjsfg3pdzzocax6a4oznoyf5k4etzknfatqu23i43wxejwdaffoa.b32.i2p {
reverse_proxy https://projectsegfau.lt {
header_up Host "projectsegfau.lt"
}
import tor www
import i2ploc pjsfg3pdzzocax6a4oznoyf5k4etzknfatqu23i43wxejwdaffoa.b32.i2p
}
http://www.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion http://pjsfg3pdzzocax6a4oznoyf5k4etzknfatqu23i43wxejwdaffoa.b32.i2p {
reverse_proxy https://projectsegfau.lt {
header_up Host "projectsegfau.lt"
@ -68,9 +61,9 @@ http://gothub.dev.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion
import tor gothub.dev
reverse_proxy localhost:1025
}
http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion http://pjsfi2szfkb4guqzmfmlyq4no46fayertjrwt4h2uughccrh2lvq.b32.i2p {
http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion http://pjsfhqamc7k6htnumrvn4cwqqdoggeepj7u5viyimgnxg3gar72q.b32.i2p {
import tor inv
import i2ploc pjsfi2szfkb4guqzmfmlyq4no46fayertjrwt4h2uughccrh2lvq.b32.i2p
import i2ploc pjsfhqamc7k6htnumrvn4cwqqdoggeepj7u5viyimgnxg3gar72q.b32.i2p
reverse_proxy https://invidious.projectsegfau.lt {
header_up Host "invidious.projectsegfau.lt"
}

View File

@ -1,5 +1,7 @@
stats.eu.projectsegfau.lt {
import auth
basicauth * {
admin $2a$14$4R5m1Kl74xwVp8MsR.jFeOpa6ssXwHN7ANwJi300zIrienTG44Abi
}
reverse_proxy localhost:9100
import def
}