Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

PhenixGames/phenixgames-v3

Repository files navigation

PhenixGames

Mittelblut9

wakatime

Installation Guide

Requirements:

- docker
- node / npm

Installation - (Linux)

  1. Install docker (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04)

  1. Install docker compose (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04)

  1. Start docker docker compose up -d

  1. Clone this repository git clone https://github.com/PhenixGames/phenixgames-v3.git

  1. Clone vue repository git clone https://github.com/PhenixGames/phenixgames-v3-vue.git

  1. Install dependencies npm install

  1. Copy .env.example to .env

  1. Insert data to .env file

  1. Copy client_packages/_config/config.example.js to client_packages/_config/config.js

  1. Insert data to client_packages/_config/config.js

  1. Copy _assets/json/debug/debug.example.json to _assets/json/debug/debug.json

Production

  1. Add File docker-compose.override.yml
  2. Insert code:
services:
    mysql:
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - MYSQL_DATABASE=phenixgames-v3
            - MYSQL_USER=xxxx
            - MYSQL_PASSWORD=xxxxxx
            - MYSQL_PORT=3306

    vue:
        build:
            context: ./phenixgames-v3-vue
            dockerfile: ./.docker/Dockerfile.prod

Important commands

docker compose up -d //start containers
docker compose down //stop containers
docker compose exec [container_name] bash //enter terminal of container
docker logs --follow [container_name/id] //see logs & follow them
docker rmi $(docker images -a -q) // delete all images on you machine
docker system prune -a //hardcore delete everything
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' name_or_id //get ip of container

Pre Push events

Copy pre-push file to .git/hooks/