File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " https://docs.renovatebot.com/renovate-schema.json" ,
3+ "extends" : [
4+ " config:base" ,
5+ " schedule:weekends"
6+ ],
7+ "prHourlyLimit" : 8 ,
8+ "packageRules" : [
9+ {
10+ "paths" : [" **" ],
11+ "groupName" : " backend"
12+ }
13+ ]
14+ }
Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on : push
4+
5+ jobs :
6+
7+ build-and-deploy :
8+ name : build and deploy (main)
9+ timeout-minutes : 10
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v3
14+ - name : Login to Docker registry
15+ uses : docker/login-action@v2
16+ with :
17+ registry : postmodern.alexdaniel.org
18+ username : ' alexdaniel'
19+ password : ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
20+ - name : Build and push
21+ id : docker_build
22+ uses : docker/build-push-action@v4
23+ with :
24+ push : true
25+ tags : postmodern.alexdaniel.org/alexdaniel-backend:${{ github.sha }} ${{ github.ref == 'refs/heads/main' && ', postmodern.alexdaniel.org/alexdaniel-backend:latest' || '' }}
26+ - name : Set SSH key
27+ if : github.ref == 'refs/heads/main'
28+ uses : webfactory/ssh-agent@v0.8.0
29+ with :
30+ ssh-private-key : ${{ secrets.SSH_KEY }}
31+ - name : Auth
32+ if : github.ref == 'refs/heads/main'
33+ run : ssh-keyscan -H postmodern.alexdaniel.org >> ~/.ssh/known_hosts
34+ - name : Deploy
35+ if : github.ref == 'refs/heads/main'
36+ run : docker stack deploy --with-registry-auth -c compose.yaml alexdaniel-backend
37+ env :
38+ DOCKER_HOST : ssh://alexdaniel@postmodern.alexdaniel.org
Original file line number Diff line number Diff line change 1+ FROM httpd:2.4.58
2+
3+ RUN apt-get update
4+ RUN apt-get install -y libcgi-pm-perl libcapture-tiny-perl libdatetime-perl libcapture-tiny-perl libgeo-ip-perl
5+
6+ COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf-extra
7+ RUN cat /usr/local/apache2/conf/httpd.conf-extra >> /usr/local/apache2/conf/httpd.conf
8+
9+ COPY ./htdocs/ /usr/local/apache2/htdocs/
10+ COPY ./cgi-bin/ /usr/local/apache2/cgi-bin/
11+ COPY ./config/ /usr/local/apache2/config/
12+
13+ # Set permissions to www-data, there's seems to be no other way to do that
14+ RUN sed -i 's/^exec /chown -R www-data:www-data \/ srv\/ data\n\n exec /' /usr/local/bin/httpd-foreground
Original file line number Diff line number Diff line change 1+ version : " 3.7"
2+
3+ services :
4+ backend :
5+ image : postmodern.alexdaniel.org/alexdaniel-backend:latest
6+ build :
7+ context : .
8+ volumes :
9+ - /home/alexdaniel/data/alexdaniel/data:/srv/data
10+ - /home/alexdaniel/data/alexdaniel/logs:/srv/logs
11+ networks :
12+ - caddy
13+ deploy :
14+ replicas : 1
15+ update_config :
16+ parallelism : 1
17+ delay : 30s
18+ order : start-first
19+
20+ labels :
21+ caddy : alexdaniel.org, www.alexdaniel.org
22+ caddy.tls : alex.jakimenko+caddy@gmail.com
23+ caddy.reverse_proxy : " {{upstreams 80}}"
24+
25+ networks :
26+ caddy :
27+ external : true
Original file line number Diff line number Diff line change 1+ LoadModule cgid_module modules/mod_cgid.so
2+ LoadModule rewrite_module modules/mod_rewrite.so
3+
4+ ServerAdmin alex.jakimenko+server@gmail.com
5+ DocumentRoot /usr/local/apache2/htdocs/
6+
7+ SetEnv WikiConfigFile /usr/local/apache2/config/config
8+ SetEnv WikiModuleDir /usr/local/apache2/config/modules
9+ SetEnv WikiDataDir /srv/data
10+
11+ <Directory / >
12+ Options -ExecCGI -FollowSymLinks -Indexes -Includes
13+ AllowOverride None
14+ </Directory >
15+
16+ <Directory /usr/local/apache2/htdocs/ >
17+ AllowOverride All
18+ </Directory >
19+
20+ ErrorLog /srv/logs/error.log
21+ CustomLog /srv/logs/access.log combined
You can’t perform that action at this time.
0 commit comments