Getting Started
Let's discover GenGame in less than 5 minutes.
There are two ways to get GenGame up and running: using Docker or building it from source. We recommend using Docker, as it's easier to manage. Building from source is intended for those who want to develop GenGame further or are interested in understanding how it works under the hood.
Using Docker (Recommended)
First, create a file docker-compose.yml
.
services:
gen_game:
container_name: gen_game
image: f4th4n/gen_game:latest
environment:
DATABASE_URL: ecto://postgres:postgres@postgres/gen_game_prod
depends_on:
- postgres
ports:
- 4000:4000
postgres:
container_name: postgres
image: postgres:14-alpine
healthcheck:
test: "pg_isready -U postgres"
volumes:
- postgres:/var/lib/postgresql/data
environment:
PSQL_HISTFILE: /root/log/.psql_history
POSTGRES_PASSWORD: postgres
POSTGRES_DB: gen_game_prod
ports:
- 5433:5432
volumes:
postgres:
Then run the command:
docker compose up
Test by visiting http://localhost:4000/, if you see response below then congratulation, it works:
{
"status": "ok",
"app": "gen_game"
}
Build Yourself
Requirements
- Elixir
- Erlang
- Postgres
Steps
- Clone the repo
- Copy
.env.example
to.env
- Update
.env
, fill DATABASE_URL - Run command below:
source .env
iex --sname gen_game --cookie g3ng4m3 -S mix phx.server
Test by visiting http://localhost:4000/, if you see:
{
"status": "ok",
"app": "gen_game"
}
then it works.
Next
Next, let's see some exciting features.