Giter Club home page Giter Club logo

Rising Constellation

License

This project contains parts released under different licenses:

Images / Visuals

All images or visual assets are released under Attribution-NonCommercial 4.0 International (CC BY-NC 4.0), Copyright 2021 Clément Chassot / Loïc Lebas.

Music

All music files or sound assets are released under Attribution-NonCommercial 4.0 International (CC BY-NC 4.0), Copyright 2021 Jérôme Clavien.

Source Code

Source code is released under the MIT license, Copyright 2021 Gil Clavien.

Local Setup

Running the project locally:

  1. postgres (database)
  2. phoenix (front+back)

1. Database

  • docker-compose up -d to start a local postgres instance writing to ./pgdata
  • mix ecto.create to create the database
  • mix ecto.migrate to setup the database schema
  • mix run priv/repo/seeds.exs to insert fixtures

(using a prod DB backup locally: see db-restore.sh)

2. Front+Back

Running Frontend Projects Independently

  1. Disable the corresponding watcher(s)
  2. Run the frontend project(s) manually: npm run serve

Tests

  • MIX_ENV=test mix test

Distributed Local Setup

  • Run at least two nodes:
    • make a
    • make b
    • (make c)

To shut down a node, type :init.stop

Frontend Assets

Vue Projects (front/(game|portal))

  • For images and fonts, as url() in the CSS or src="" in HTML, put the assets in public/ eg. public/foo/bar.png and reference them using ~public/foo/bar.png
  • Other static assets: put them in a subfolder of public/, eg. public/media/foo.pdf and they will become available at /(game|portal)/media/foo.pdf. Linking to them from of the vue projects then requires a relative link, eg. href="media/foo.pdf

Phoenix (HTML or LiveView) Assets

  • Assets in /assets/static will be available at /, eg. /assets/static/FOO/logo.png will be served at /FOO/logo.png

Deployment

make build upload

  • make build compiles the 3 frontends into a tar.gz and the backend as a release into a tar.gz, then extracts these archives.
  • make upload sends these archives to a remote server.

The reason we assemble the release in a Docker image is to get a reproducible build on a linux system close to the prod servers. Prod servers don't have access to the source code and don't have nodejs etc. installed.

Adding a node

  1. create instance from image prod-template-1
  2. add IP as A record to nodes.rising-constellation.com
  3. bashrc: export [email protected] (ip of the node), right after these (they should already be set):
export APPSIGNAL_PUSH_API_KEY=…
export RELEASE_COOKIE="…"

Rising Constellation's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.