Skip to content

Commit

Permalink
chore: add server var emv
Browse files Browse the repository at this point in the history
  • Loading branch information
Clovis committed Oct 19, 2024
1 parent 19ffd24 commit 7cb3214
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM alpine:3.20

# Please set this var env at startup as it is mandatory
ENV SERVER localhost

# noircir repo: where to fetch updates
ENV NOIRCIR_RELEASE=https://api.github.com/repos/BDX-town/Noircir/tags
# noircir folder: where you saved noircir files
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Users can:
You can set or change these values in your environement in order to change some parameters:

```bash
# Please set this var env at startup as it is mandatory
ENV SERVER localhost
# noircir folder: where you saved noircir files
ENV NOIRCIR_FOLDER="/noircir"
# nginx root: all noircir data will be saved there, blogs and generated content
Expand All @@ -44,6 +46,14 @@ ENV WWW_USER=noircir
ENV WWW_GROUP=www-data
```

We are providing a docker image via Github release for ease of use.

```
# Any of the var env specified earlier can be set with the -e arg
docker run -p <external-port>:8080 -e "SERVER=<your server address>" noircir
```


## Roadmap

- use Oauth instead of basic Auth
Expand Down
4 changes: 2 additions & 2 deletions cms/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_SERVER=http://localhost:8080
VITE_BLOGS_PATH="blogs"
VITE_SERVER='$SERVER'
VITE_BLOGS_PATH='$BLOGS_FOLDER'
VITE_WEBP_QUALITY=0.75
VITE_POST_LINK_FORMAT="${server}/${client.username}/${post.file.match(/(.+)\.md$/)[1]}/index.html"

0 comments on commit 7cb3214

Please sign in to comment.