Make host port configurable via AW_PORT (default 8090, AMP uses 8080)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HJhXuLD2Z6hv3Wqeq9UL9K
This commit is contained in:
@@ -48,10 +48,10 @@ cp .env.example .env
|
||||
nano .env # set AW_REGISTRATION_CODE, and AW_TRUST_PROXY=1 (nginx is in front)
|
||||
chmod 600 .env
|
||||
docker compose up -d --build
|
||||
curl -sI http://127.0.0.1:8080 | head -1 # should print HTTP/1.1 200 OK
|
||||
curl -sI http://127.0.0.1:8090 | head -1 # should print HTTP/1.1 200 OK
|
||||
```
|
||||
|
||||
The container only listens on `127.0.0.1:8080`, so it is not reachable from outside until nginx forwards to it. The database is `./db/aw.db`.
|
||||
The container only listens on `127.0.0.1:8090` (change it with `AW_PORT` in `.env` if the port is taken, e.g. AMP uses 8080), so it is not reachable from outside until nginx forwards to it. The database is `./db/aw.db`.
|
||||
|
||||
## 4. nginx + HTTPS
|
||||
|
||||
@@ -65,7 +65,7 @@ server {
|
||||
client_max_body_size 1m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_pass http://127.0.0.1:8090; # same as AW_PORT in .env
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $remote_addr; # overwrite, so clients cannot fake their address
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
@@ -82,7 +82,7 @@ sudo certbot --nginx -d aw.yourdomain.tld # gets the certificate, adds
|
||||
|
||||
Then add inside the HTTPS `server` block: `add_header Strict-Transport-Security "max-age=31536000" always;`
|
||||
|
||||
Firewall: only SSH, 80 and 443 should be open. Port 8080 is not published to the outside at all.
|
||||
Firewall: only SSH, 80 and 443 should be open. The app port (AW_PORT, default 8090) is not published to the outside at all.
|
||||
|
||||
Open the site, choose "Create account" and register with your registration code.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user