User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
services:endurain [2025/05/21 08:10] – created willyservices:endurain [2025/11/06 11:09] (current) – [Reverse Proxy] willy
Line 19: Line 19:
 Then grab the example docker-compose.yml [[https://github.com/joaovitoriasilva/endurain/blob/master/docker-compose.yml.example|here]], put it under **/data/daemons/enbdurain/docker-compose.yml** and customize like the following: Then grab the example docker-compose.yml [[https://github.com/joaovitoriasilva/endurain/blob/master/docker-compose.yml.example|here]], put it under **/data/daemons/enbdurain/docker-compose.yml** and customize like the following:
 <file - docker-compose.yml> <file - docker-compose.yml>
 +services:
 +  endurain:
 +    container_name: endurain
 +    image: ghcr.io/joaovitoriasilva/endurain:latest
 +    environment:
 +      - TZ=Europe/Rome
 +      - DB_PASSWORD=<< random password for the database >>
 +      - SECRET_KEY=<< see below >>
 +      - FERNET_KEY=<< see below >>
 +      - GEOCODES_MAPS_API=<< see below >>
 +      - ENDURAIN_HOST=https://train.mydomain.com
 +      - UID=0
 +      - GID=0
 +      - BEHIND_PROXY=true
 +    volumes:
 +      - /var/log/endurain:/app/backend/logs # log files for the backend
 +      - /data/endurain/data:/app/backend/data # necessary for activity files, user images and server images persistence on container image updates
 +    ports:
 +      - "5123:8080"
 +    depends_on:
 +      postgres:
 +    networks:
 +      - endurain-network
 +  
 +  postgres:
 +    image: docker.io/postgres:17.5
 +    container_name: postgres
 +    environment:
 +      - POSTGRES_PASSWORD=<< same password as above database password >>
 +      - POSTGRES_DB=endurain
 +      - POSTGRES_USER=endurain
 +      - PGDATA=/var/lib/postgresql/data/pgdata
 +    ports:
 +      - "5432:5432"
 +    volumes:
 +      - /data/endurain/postgres:/var/lib/postgresql/data
 +    networks:
 +      - endurain-network
  
 +networks:
 +  endurain-network: {}
 </file> </file>
  
Line 32: Line 72:
 </code> </code>
  
-The **GEOCODES_MAPS_API** is not needed if the 1request/second, 5000 request/day limit is enough for you. Otherwise, you need to upgrade to a paid plan on [[https://geocode.maps.co/|Geocode]].+The **GEOCODES_MAPS_API** is needed even if the 1request/second, 5000 request/day limit is enough for you. Otherwise, you need to upgrade to a paid plan on [[https://geocode.maps.co/|Geocode]]. To get the key just do the free registration and get the key.
  
 Volumes will be mounted under **/data/endurain**. Volumes will be mounted under **/data/endurain**.
Line 43: Line 83:
 <code bash> <code bash>
 podman compose pull podman compose pull
 +podman compose up
 </code> </code>
  
 +Please note that due to database initialization time, the first startup might fail on the Endurain app. In this case let the database initialize properly, shut down and restart the containers.
  
  
Line 71: Line 113:
                 proxy_set_header  X-Forwarded-Host $server_name;                 proxy_set_header  X-Forwarded-Host $server_name;
                 proxy_set_header  X-Forwarded-Proto $scheme;                 proxy_set_header  X-Forwarded-Proto $scheme;
 +                proxy_http_version 1.1;
 +                proxy_set_header Upgrade $http_upgrade;
 +                proxy_set_header Connection $http_connection;
         }         }
  
Line 97: Line 142:
 </code> </code>
  
 +
 +===== Configuration =====
 +
 +Go to the web UI and do the first login as user **admin** with password **admin**, then immediately change the password. 
 +
 +You can now start adding users and using the tool!
 +
 +
 +===== Log rotation =====
 +
 +Create the following **/etc/logrotate.d/endurain** file:
 +<file - endurain>
 +/var/log/endurain/* {
 +    missingok
 +    notifempty
 +}
 +</file>