https://github.com/fazers/portfolio-server
https://github.com/fazers/portfolio-server
docker docker-compose traefik
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fazers/portfolio-server
- Owner: FaZeRs
- License: mit
- Created: 2022-08-22T19:39:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-14T07:30:56.000Z (over 3 years ago)
- Last Synced: 2025-03-26T16:26:20.107Z (over 1 year ago)
- Topics: docker, docker-compose, traefik
- Language: Shell
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Portfolio Server
[](https://opensource.org/licenses/MIT)
| Repository | Info |
|---------------------------------------------------------------------|--------------------|
| [portfolio-client](https://github.com/FaZeRs/portfolio-client) | Frontend |
| [portfolio-api](https://github.com/FaZeRs/portfolio-api) | Rest API |
| [portfolio-server](https://github.com/FaZeRs/portfolio-server) | Docker Environment |
## Features
- ⚡️[Traefik 2](https://github.com/traefik/traefik/) - The Cloud Native Application Proxy
- 💻 [MySQL](https://github.com/mysql/mysql-server) - Database
- 🍪 [Redis](https://github.com/redis/redis) - In-Memory database
- 📦 [Minio](https://github.com/minio/minio) - Multi-Cloud Object Storage
- 👀 [Watchtower](https://github.com/containrrr/watchtower) - Automating Docker container base image updates
## Installation
Create a `.env` file from the template `.env.template` file.
```bash
cp .env.template .env
```
Generate public and private key pair for jwt authentication:
### With docker
Run this command:
```bash
./scripts/generate-jwt-keys
```
It will output something like this. You only need to add it to your `.env` file.
```
To setup the JWT keys, please add the following values to your .env file:
API_JWT_PUBLIC_KEY_BASE64="(long base64 content)"
API_JWT_PRIVATE_KEY_BASE64="(long base64 content)"
```
### Without docker
```bash
$ ssh-keygen -t rsa -b 2048 -m PEM -f jwtRS256.key
# Don't add passphrase
$ openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
```
You may save these key files in `./local` directory as it is ignored in git.
Encode keys to base64:
```bash
$ base64 -i local/jwtRS256.key
$ base64 -i local/jwtRS256.key.pub
```
Must enter the base64 of the key files in `.env`:
```bash
API_JWT_PUBLIC_KEY_BASE64=BASE64_OF_JWT_PUBLIC_KEY
API_JWT_PRIVATE_KEY_BASE64=BASE64_OF_JWT_PRIVATE_KEY
```
## Usage
```bash
$ docker compose up
```