Skip to content

Commit

Permalink
Dockerfile: scratch -> alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
aceberg committed Nov 1, 2024
1 parent 18ba81e commit f20ac88
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-docker-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/arm/v6
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:v2
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ builds:

nfpms:
- maintainer: aceberg <[email protected]>
description: Session-cookie auth reverse proxy
description: Reverse proxy with session-cookie auth
homepage: https://github.com/aceberg/ForAuth
license: MIT
section: utils
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COPY . /src
RUN cd /src/cmd/ForAuth/ && CGO_ENABLED=0 go build -o /ForAuth .


FROM scratch
FROM alpine

WORKDIR /data/ForAuth
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Configuration can be done through config file or environment variables
| FA_HOST | Listen address for both Config and Proxy | 0.0.0.0 |
| FA_PORT | Port for Proxy | 8800 |
| FA_PORTCONF | Port for Config page | 8801 |
| FA_TARGET | Where to proxy after login (host:port). Example: `0.0.0.0:8840` | |
| FA_TARGET | Where to proxy after login (host:port). Example: `192.168.1.1:8840` | |
| FA_THEME | Any theme name from https://bootswatch.com in lowcase or [additional](https://github.com/aceberg/aceberg-bootswatch-fork) (emerald, grass, grayscale, ocean, sand, wood)| united |
| FA_COLOR | Background color: light or dark | dark |
| FA_NODEPATH | Path to local JS and Themes ([node-bootstrap](https://github.com/aceberg/my-dockerfiles/tree/main/node-bootstrap)) | |
Expand Down
12 changes: 12 additions & 0 deletions configs/ForAuth.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=ForAuth
Documentation=https://github.com/aceberg/ForAuth
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/forauth -d /etc/ForAuth/
Restart=on-failure

[Install]
WantedBy=multi-user.target
13 changes: 13 additions & 0 deletions configs/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=ForAuth
Documentation=https://github.com/aceberg/ForAuth
After=network-online.target
Wants=network-online.target

[Service]
User=%i
ExecStart=/usr/bin/forauth -d /home/%i/.config/ForAuth/
Restart=on-failure

[Install]
WantedBy=multi-user.target
5 changes: 5 additions & 0 deletions configs/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

cp forauth /usr/bin/
cp ForAuth.service /lib/systemd/system/
cp [email protected] /lib/systemd/system/
3 changes: 3 additions & 0 deletions configs/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

systemctl daemon-reload
10 changes: 7 additions & 3 deletions internal/web/templates/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<table class="table table-borderless">
<form action="/config/" method="post">
<tr>
<td>Proxy Host</td>
<td>Host</td>
<td><input name="host" type="text" class="form-control" value="{{ .Config.Host }}"></td>
</tr>
<tr>
Expand Down Expand Up @@ -104,8 +104,12 @@
<div class="card border-primary mb-4">
<div class="card-header">About (<a href="https://github.com/aceberg/ForAuth/releases/tag/{{ .Version }}" target="_blank">{{ .Version }}</a>)</div>
<div class="card-body">
<p>If you find this app useful, please, <a href="https://github.com/aceberg#donate" target="_blank">donate</a></p>
<p>Commission you own app (Golang, HTML/JS). Contact and prices <a href="https://github.com/aceberg" target="_blank">here</a></p>
<p><b>● Proxy Port</b> - default 8800</p>
<p><b>● Config Port</b> - config GUI can be reached on this port. Default 8801</p>
<p><b>● Target</b> - where to proxy after login (host:port). Example: <code>192.168.1.1:8840</code></p>
<p><b>● Node path</b> - path to local Fonts and Themes (<a href="https://github.com/aceberg/my-dockerfiles/tree/main/node-bootstrap">node-bootstrap</a>)</p>
<p><b>● Notify URL</b> - provides notifications to Discord, Email, Gotify, Telegram and other services. <a href="https://containrrr.dev/shoutrrr/v0.8/">Link to documentation</a></p>
<p><b></b>If you find this app useful, please, <a href="https://github.com/aceberg#donate" target="_blank">donate</a></p>
</div>
</div>
</div>
Expand Down

0 comments on commit f20ac88

Please sign in to comment.