Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

cyberXscape / Cybercrime Escape Game

License

Notifications You must be signed in to change notification settings

polycular/cyber-x-scape_game

Repository files navigation

PhxGame

Phoenix & A-Frame based micro-games about cybersecurity

Setup

This repo provides an easy environment setup by the usage of Nix (w/ flakes enabled).
Nix currently runs on Linux and macOS.

Enabling Nix flakes (Nix v2.4)

# ~/.config/nix/nix.conf
experimental-features = nix-command flakes

Development

Environment

# Enter shell w/ development environment
nix develop

Basics

# Get Elixir Mix deps
mix deps.get

# Get JS NPM packages
npm install --prefix assets

# Start Phoenix server
mix phx.server --open

# Enter IEx
iex -S mix

# Run tests
mix test

Build

# Release
nix develop --command './pkg/bin/build.sh'
nix build --file default.nix release

# Assets
nix develop --command './pkg/bin/build.sh'
nix build --file default.nix priv_static

Maintenance

# Update flake.lock
nix flake update

# Check / update / clean Mix deps
mix hex.outdated
mix deps.update --all
mix deps.clean --unlock --unused

# Check / update / clean NPM packages
npm outdated --prefix assets
npm update --prefix assets
npm prune --prefix assets

# Flake checks
nix flake check

Deployment

Deployment is literally as easy as:

  1. Push to GitHub
  2. Run deploy script
./pkg/bin/deploy.ps1

But with the requirement you have local SSH access to cxs_app_server also named as such.

Example configuration of your SSH config file could be:

Host antibiotix cxs_app_server
  HostName 10.125.0.140
  User main
  IdentityFile ./keys/service_ed25519

More details documented at guides/deploy.md.

Founding

Supported by the funding campaign netidee.at.

netidee.at

If you have interest in further funding our project, please get in touch.

License

The license applies only to the code in this repository.
Product names, logos, texts and other assets are explicitly excluded.


Initiator: Polycular e.U. / polycular.com