Warning
This tool is under heavy development and is NOT yet suitable for production use.
This project is a web application designed for project management.
- Backend: Go
- Frontend: TypeScript, Vite
- Database: MySQL
- Development Environment: Docker, Nx
- Hot Reloading: Air (for Go backend)
To set up and run the project in development mode, follow these steps:
-
Clone the repository (if you haven't already).
-
Ensure Docker is installed and running on your system.
-
Navigate to the project's root directory in your terminal.
-
Start the development environment by running the following command:
make dev
This command will use Docker Compose to set up and launch all necessary services, including the backend API, frontend, and database.
-
Access the application typically via
http://localhost:8081(theopencommand in the Makefile might do this automatically). -
(Optional) Seed the database with initial data:
make seed
This command uses the
seed.yamlfile to populate the database. -
(Advanced) Access the project's CLI environment:
make cli
This command starts a CLI tool in a detached Docker container, allowing you to run various utility commands.
-
(Advanced) Purge all data from the database:
make purge
This command will execute a purge operation, which is useful for resetting the database to an empty state. Use with caution!
For detailed commands or specific services, you can explore the Makefile in the project's root directory.
The production image runs the Go API and the compiled Vue frontend in a single container behind nginx.
docker pull ghcr.io/librepm-project/librepm:latestservices:
app:
image: ghcr.io/librepm-project/librepm:latest
restart: unless-stopped
ports:
- "80:80"
environment:
DB_HOST: database
DB_PORT: 3306
DB_USER: librepm
DB_PASSWORD: changeme
DB_NAME: librepm
JWT_SECRET: changeme-use-a-long-random-string
volumes:
- uploads:/app/uploads
depends_on:
database:
condition: service_healthy
database:
image: mariadb:11.5
restart: unless-stopped
environment:
MYSQL_DATABASE: librepm
MYSQL_USER: librepm
MYSQL_PASSWORD: changeme
MYSQL_ROOT_PASSWORD: changeme-root
volumes:
- db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
volumes:
uploads:
db-data:After the containers are up, seed the initial data:
docker compose -f docker-compose.production.yaml exec app \
/usr/local/bin/api-server seed| Variable | Required | Description |
|---|---|---|
DB_HOST |
yes | MariaDB/MySQL hostname |
DB_PORT |
yes | Database port (default: 3306) |
DB_USER |
yes | Database user |
DB_PASSWORD |
yes | Database password |
DB_NAME |
yes | Database name |
JWT_SECRET |
yes | Secret used to sign JWT tokens — use a long random string in production |
REGISTER_ALLOWED |
no | Allow new user registration via the /register page. Set to true to enable, omit or set to false to disable (recommended in production) |
The container exposes port 80. If you put it behind a reverse proxy (nginx, Caddy, Traefik), point the upstream at the container's port 80. No path prefix stripping is needed — the internal nginx already handles /api/ routing.