-
Notifications
You must be signed in to change notification settings - Fork 17
Installation
The available docker images have support for the following platforms: linux/amd64
, linux/arm64
.
If the docker container is running as root (which it does by default), then Jetlog will attempt to first change the data path's ownership to the specified user, and then run as that user with gosu
. Note that the specified user is PUID:PGID
(1000:1000
by default). If Jetlog fails to set the data path's permission for some reason, it will inform you of that in the log and run as root.
Otherwise, if the docker container is not running as root (e.g. if you specified a user
in your docker compose), then Jetlog will attempt to run using whatever that user is. This means that if you run the container with a user that doesn't have permission to the data path, Jetlog will fail to start. To fix this, run sudo chown -R PUID:PGID /path/to/jetlog/volume
on your machine, changing PUID:PGID
to represent whatever user the docker container was running as. Alternatively, you can change the user that the docker container is running as to the user that has ownership of the data path.
If you wish to run jetlog under a path prefix (which requires you to use a reverse proxy such as nginx or traefik), you can simply set the JETLOG_BASE_URL
environment variable and configure your reverse proxy accordingly.
Here's an example configuration with nginx:
docker-compose.yml
services:
jetlog:
image: pbogre/jetlog:experimental
volumes:
- /path/to/data:/data
restart: unless-stopped
environment:
JETLOG_PORT: 4000
JETLOG_BASE_URL: /jetlog
SECRET_KEY: XXXXXXXXX
ports:
- 4000:4000
networks:
- my_network
nginx:
image: nginx
volumes:
- /path/to/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- 80:80
networks:
- my_network
networks:
my_network:
external: false
default.conf
server {
listen 80;
server_name localhost;
location /jetlog/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://jetlog:4000/;
}
}
-
:latest
will contain tested features and a more stable experience -
:experimental
will contain features that were not thoroughly tested -
:x.x.x
will contain a specific version of the project. Example::1.0.0
Name | Default | Function |
---|---|---|
JETLOG_PORT |
3000 |
HTTP Port |
JETLOG_BASE_URL |
/ |
Path prefix |
SECRET_KEY |
Required | JWT Secret used for authentication |
TOKEN_DURATION |
7 |
Time in days before JWT token expires |
PGID |
1000 |
Group ID for Jetlog |
PUID |
1000 |
User ID for Jetlog |
APP_PATH |
/app |
Container app path |
DATA_PATH |
/data |
Container data path |
Note: to generate a good
SECRET_KEY
, you can use one of the following commands:openssl rand -base64 64 | tr -d '\n' node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
- Clone the repository and
cd
to it - Install npm dependencies and build frontend
npm i --package-lock-only npm ci npm run build
- Install pipfile dependencies with pipenv
pip install pipenv pipenv install
- Open the virtual shell and start the server
Alternatively, you can use the
pipenv shell (jetlog) DATA_PATH=/your/data/path SECRET_KEY=abcdef python -m uvicorn main:app --app-dir server --host 0.0.0.0 --port 3000
npm run watch
command to watch and update on live frontend changes, and then run the backend server on a separate shell with the last part of the previous command. - All done, you can open
http://localhost:3000
on your browser to view jetlog