Skip to content

graasp/admin

Repository files navigation

Graasp Phoenix

This is the codebase for the Graasp platform written in Elixir using the Phoenix web framework

This project was generated with phoenix version 1.8.0

Required tools

This project uses mise.

Install all dependencies with (installs elixir and erlang):

mise i
Installing Elixir with brew (not recommended)

Elixir

You will need Elixir and OTP installed. On MacOS simply run: brew install elixir For installation instructions refer to the elixir installation guide

You can test you installation by running elixir -v. It should output something like:

Erlang/OTP 28 [erts-16.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace]

Elixir 1.18.4 (compiled with Erlang/OTP 27)

Also install elixir-ls (one of) the Elixir Language server. With brew:

brew install elixir-ls

PostgreSQL

You will need a running PostgreSQL server.

This project is made to work with the postgresql server running in the devcontainer for the graasp/core project.

In case you do not want to use the devcontainer, you can use the following command to start a postgresql server:

docker run -d -p 5432:5432 \
              -e POSTGRES_USER=postgres \
              -e POSTGRES_DB=postgres \
              -e POSTGRES_PASSWORD="postgres" \
              --name postgres postgres:17.5-alpine

With a graphical client like Postgres.app on MacOS.

Getting Started

  1. Ensure you have Elixir installed (elixir -v should show you the version)
  2. Install project dependencies with: mix setup
  3. Start you Phoenix server:
    • Run mix setup to install and setup dependencies
    • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server
  4. Create a .env.sh file with the following content. Use the values you get from configuring garage in the core project:
    # .env.sh
    export AWS_ACCESS_KEY_ID=GK3b...
    export AWS_SECRET_ACCESS_KEY=a03cf77e181...
    export AWS_DEFAULT_REGION=garage
    You will need to source this file in your shell before starting the server:
    source .env.sh
    Now you can visit localhost:4000 from your browser.

Deployment

The application is deployed using ECS. The deployment process is handled by the graasp/infrastrucutre repository. It is in charge of registering the service and starting the tasks with the proper environment variables. This repo simply builds the docker images and pushes them to the private ECR registry.

Please checkout the setup docs for more information on how to bootstrap a server to deploy your app in production.

Common commands

Checkout the memento for an overview of helpful commands for managing the project (deployment and development).

Troubleshooting and general help

Cleaning artifacts after making a release

If you made a release localy it is possible that you end-up with a lot of files in the priv/static/ folder.

Before committing, run: mix phx.digest.clean --all to clean them.

About

Administration interface for the Graasp platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 12