PostgreSQL v14.5
Python v3.10
Nginx v1.22.0
RabbitMQ v3.11.2
FastAPI v0.87.0
React v18.2.0
Docker v20.10+
Docker Compose v2.10.2+
create a .env
file at the root directory
DB_HOST={Hostname of DBMS. Defaults to 127.0.0.1}
DB_PORT={Post of DBMS. Defaults to 5432}
DB_USERNAME={Login username for DBMS}
DB_PASSWORD={Login password for DBMS}
DB_NAME={Name of database}
AMQP_HOST={Host of RabbitMQ server}
RIOT_TOKEN={Access token for Riot API}
REACT_APP_GG_API_ROOT={API root for frontend application}
REACT_APP_GG_WS_ROOT={Websocket root for frontend application}
REACT_APP_DDRAGON_API_ROOT={API root of DataDragon API. Used for serving static images}
REACT_APP_OPGG_API_ROOT={API root of OPGG API. Used for serving static images}
DB_HOST="db"
DB_PORT="5432"
DB_USERNAME="admin_15gg"
DB_PASSWORD="admin_15gg"
DB_NAME="db_15gg"
AMQP_HOST="amqp://guest:guest@rabbitmq"
RIOT_TOKEN="RGAPI-e8b2eb5d-0764-4a8a-bec3-45cefff5c75e"
REACT_APP_GG_API_ROOT="http://localhost:8000/api/v1"
REACT_APP_GG_WS_ROOT="ws://localhost:8000/api/v1/socket"
REACT_APP_DDRAGON_API_ROOT="http://ddragon.leagueoflegends.com/cdn/12.22.1/img"
REACT_APP_OPGG_API_ROOT="https://opgg-static.akamaized.net/images"
> docker compose up -d
> brew install --cask docker
- create a
.env
file at the frontend directory - set environment variables
- if you want to run backend app locally
- run backend container
> docker compose up -d
> docker compose stop gg_frontend
- set
REACT_APP_GG_API_ROOT
tohttp://localhost:8000/api/v1
- set
REACT_APP_GG_WS_ROOT
tows://localhost:8000/api/v1/socket
- the .env file in the frontend directory should look like
REACT_APP_GG_API_ROOT="http://localhost:8000/api/v1" REACT_APP_GG_WS_ROOT="ws://localhost:8000/api/v1/socket" REACT_APP_DDRAGON_API_ROOT="http://ddragon.leagueoflegends.com/cdn/12.22.1/img" REACT_APP_OPGG_API_ROOT="https://opgg-static.akamaized.net/images"
- if you want to run backend app locally
- run frontend as a development server
> cd 15GG_front > yarn > yarn start
- create a
.env
file at the backend directory - set environment variables
- set
AMQP_HOST
toamqp://guest:guest@localhost
- run RabbitMQ container
> docker compose up -d rabbitmq
- if you want to use local DBMS (on your host machine)
- set
DB_HOST
to127.0.0.1
- set
- OR if you want to use the default DBMS (on container)
- set
DB_HOST
todb
- run DB container
> docker compose up -d db
- set
- the .env file in the backend directory should look like
DB_HOST="127.0.0.1" DB_PORT="5432" DB_USERNAME="admin_15gg" DB_PASSWORD="admin_15gg" DB_NAME="db_15gg" RIOT_TOKEN="RGAPI-e8b2eb5d-0764-4a8a-bec3-45cefff5c75e" AMQP_HOST="amqp://guest:guest@localhost"
- set
- run backend as a development server
> cd 15GG_back > pipenv install > pipenv shell > uvicorn app.main:app --reload
.
├── 15GG_back
│ ├── Dockerfile
│ ├── .env
│ ├── Pipfile
│ ├── Pipfile.lock
│ ├── README.md
│ ├── alembic.ini
│ ├── app
│ ├── migrations
│ ├── requirements.txt
│ ├── settings.yaml
│ └── test
├── 15GG_front
│ ├── @types
│ ├── Dockerfile
│ ├── .env
│ ├── README.md
│ ├── build
│ ├── nginx.conf
│ ├── node_modules
│ ├── package.json
│ ├── public
│ ├── src
│ ├── tsconfig.json
│ └── yarn.lock
├── LICENSE
├── README.md
├── .env
└── docker-compose.yml