Berg János 3e597829b6
All checks were successful
Build docker image / build_docker_image (push) Successful in 1m14s
# Added manual workflow run capability to the main workflow.
2025-07-18 16:13:26 +02:00
2025-05-03 10:54:14 +02:00
2025-05-03 10:44:50 +02:00
2025-05-12 11:53:36 +02:00
2025-05-01 19:26:39 +02:00
2025-05-01 19:26:39 +02:00
2025-05-01 19:26:39 +02:00
2025-05-01 19:26:39 +02:00
2025-05-03 11:01:39 +02:00

Docker build Docker build

Proxima Discord bot

Proxima Backend

Proxima is a Remainder Application, like many others, which primarily uses Discord to deliver the remainders to the user.

It provides an API interface to be embedded in other services, using Bearer Token Authentication.

This is the source code for the backend application.

This backend handles all the data managment and provides the API interface for the clients to be used.

This backend application is intended to be run as a docker container, see below.

For more details, see: Proxima -> Backend

Main Technologies used

What is needed to run the backend

  • A working docker instance with compose.

Runninig with docker

Follow these easy steps to setup and run the backend application:

Note

The program inside the container is running under a non-privileged user with

UID:1000 and GID:1000.

The database file/folder must be writable for that user!

In the example we just make it writable to everyone (please use proper access control instead!)

Or jou can build your own image with different UID/GID values.

1. Create the directory structure (bash):

mkdir -p volumes/backend/{database,env}

2. Update directory permissions to allow write access to the restricted docker user

chmod o+w volumes/backend/database

3. (OPTIONAL) If you already have a working database file, you can copy it to the app:

  cp PATH/TO/DATABASE/<database.sqlite> volumes/backend/database/
  chmod o+w volumes/backend/database/database.sqlite

4. Create the .env.config file from src/.env.example file.

wget -O volumes/backend/env/.env.config https://proxima.goliath.hu/proxima/backend/raw/branch/main/src/.env.example

-OR-

curl -f -o volumes/backend/env/.env.config https://proxima.goliath.hu/proxima/backend/raw/branch/main/src/.env.example

5. Customize the .env.config file.

Note

: The program creates its own .env file based on the .env.config file.
If you modify your .env.config file, simply restart the container and the new settings will take effect immediately.

nano volumes/backend/env/.env.config
  1. Replace or fill in the following values (after the "=" sign)

    1. APP_NAME - The application's name
      defualt: "Backend"
    2. APP_TIMEZONE - The application's timezone
      default: "UTC"
    3. APP_URL - The application's url
      default: "localhost:9000"
    4. ADMIN_EMAIL - The admin email for the backend
      default: "admin@example.com"
    5. ADMIN_PASSWORD - The admin password for the backend
      default: "PlEaSe_ChAnGe_Me"

6.1 Run with docker

docker run \
    -it \
    --rm \
    --name "proxima-backend" \
    -v "./volumes/backend/env/.env.config:/app/Backend/.env.config" \
    -v "./volumes/backend/database/:/app/Backend/database/sqlite/" \
    -p "9000:9000" \
    git.magrathea.hu/proxima/backend:latest

6.2 Running with docker compose

6.2.1 Create docker compose file docker-compose.yaml:

---
services:
    backend:
      image: proxima.goliath.hu/proxima/backend:latest
      container_name: backend
      ports:
        - "9000:9000"
      volumes:
        - "./volumes/backend/env/.env.config:/app/Backend/.env.config"
        - "./volumes/backend/database/:/app/Backend/database/sqlite/"
      restart: unless-stopped

6.2.2 Start up service

docker compose up -d

6.3 You can watch the logs of the application

docker compose logs -f
Description
Sample PHP/ReaktPHP fullstack app.
https://proxima.goliath.hu/
Readme MIT 1.3 MiB
Languages
PHP 45.1%
HTML 22.1%
JavaScript 11.9%
Blade 11.7%
CSS 7.6%
Other 1.6%