Sign inSign up

floskinner/unga

By floskinner

•Updated almost 4 years ago

Image
0

128

floskinner/unga repository overview

Logog

⁠UNGA - U Never Game Alone

Website ⁠ Website Docker Image Size (latest by date)

This is a student project of the DHBW RV Campus FN. The purpose of this webapp is that gamers can find other gamers playing the same game. Gamers have to register and afterwards they can add existing games to their profille or create new games.

⁠Getting started

⁠GitHub Repo

https://github.com/DHBW-FN-TIT20/unevergamealone⁠

⁠Docker

⁠Build the Container

If you do not want to use buildkit remove DOCKER_BUILDKIT=1 from the command. The contaienr will get the name "unevergamealone"

# Direct from the Repo
DOCKER_BUILDKIT=1 docker build -t unevergamealone https://github.com/DHBW-FN-TIT20/unevergamealone.git#main

# Local
git clone https://github.com/DHBW-FN-TIT20/unevergamealone
cd unevergamealone
DOCKER_BUILDKIT=1 docker build -t unevergamealone .

# You also can use the Makefile
git clone https://github.com/DHBW-FN-TIT20/unevergamealone
cd unevergamealone
make build

⁠Get it from DockerHub

docker pull floskinner/unga

⁠Run the Container

docker run \
    --rm \
    -d \
    -e JWT_TOKEN=SECRET_KEY \
    -e DB_NAME=db \
    -e MARIADB_ROOT_PASSWORD=db_root_password \
    -e MARIADB_DATABASE=unga \
    -e MARIADB_USER=unga \
    -e MARIADB_PASSWORD=db_unga_password \
    -v uploads:/app/public/images/upload \
    -p 80:3000 \
    --name unga \
    floskinner/unga

⁠Docker-Compose

You also can use Docker-Compose. Note that you need to set the ENVs⁠. Also note that it will build the container from the source in the example docker-compose.yml

Start the service:

docker-compose up

⁠Configuration

Default Port is set to 3000.
You also need to set the setting for the DB:

# Set it in the bash
export PORT=80                              # Default 3000
export DB_NAME=db                           # Hostname of the DB
export MARIADB_DATABASE=unga                # Default Database
export MARIADB_USER=unga                    # User with read / write permission
export MARIADB_PASSWORD=db_unga_password    # Password for the user

# OR set it in the .env
nano .env

In Production:
If the ENV "NODE_ENV" is set to production the .env-File will be ignored!
Set the ENV:

export JWT_TOKEN=MY_SECRETKEY!

Not in Production:
You can set the JWT_TOKEN in the bash or on the .env-File

# Set it in the bash
export JWT_TOKEN=MY_SECRETKEY!

# Set it in the .env
nano .env

Tag summary

Content type

Image

Digest

sha256:d0f91468b…

Size

466.9 MB

Last updated

almost 4 years ago

docker pull floskinner/unga