This project contains parts released under different licenses:
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.
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 is released under the MIT license, Copyright 2021 Gil Clavien.
Running the project locally:
- postgres (database)
- phoenix (front+back)
docker-compose up -d
to start a local postgres instance writing to./pgdata
mix ecto.create
to create the databasemix ecto.migrate
to setup the database schemamix run priv/repo/seeds.exs
to insert fixtures
(using a prod DB backup locally: see db-restore.sh
)
make ni
mix deps.get
to fetch all dependenciesiex -S mix phx.server
(or simplymix phx.server
)- RC is now running at http://localhost:4000, portal at http://localhost:4000/portal
- Disable the corresponding watcher(s)
- Run the frontend project(s) manually:
npm run serve
MIX_ENV=test mix test
- Run at least two nodes:
make a
make b
- (
make c
)
To shut down a node, type :init.stop
- For images and fonts, as
url()
in the CSS orsrc=""
in HTML, put the assets inpublic/
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
- Assets in
/assets/static
will be available at/
, eg./assets/static/FOO/logo.png
will be served at/FOO/logo.png
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.
- create instance from image
prod-template-1
- add IP as A record to nodes.rising-constellation.com
- bashrc: export [email protected] (ip of the node), right after these (they should already be set):
export APPSIGNAL_PUSH_API_KEY=…
export RELEASE_COOKIE="…"