Code that powers the official Helium Console.
Any and all contributions from the community are encouraged.
#console
channel. Join us!cd console
cp templates/.env .env
cp templates/.env-router .env-router
cp templates/docker-compose-quay.yaml docker-compose.yaml
cp templates/nginx-default.conf nginx.conf
nginx.conf
with cert and key information.env
, set SOCKET_CHECK_ORIGIN
to your host domaindocker-compose up
cp templates/docker-compose-server.yaml docker-compose.yaml
cp templates/nginx-default.conf nginx.conf
nginx.conf
with cert and key information.env
, set SOCKET_CHECK_ORIGIN
to your host domaindocker-compose build
docker-compose up
cp templates/docker-compose-local.yaml docker-compose.yaml
docker-compose build
docker-compose up
Now you can visit localhost:4000
from your browser.
In the event that Stripe requires you to restrict credit card payments to certain countries or cities, you may opt in to use the IP filter implemented in the ConsoleWeb.IPFilter
module.
To do so, please obtain a MaxMind key and download the database onto the host machine: (https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&suffix=tar.gz&license_key=${MAXMIND_KEY})
Please note you'll have to regularly update this database.
In your docker-compose
file under console
, add the following:
volumes:
- "/host/path/to/GeoLite2-City.mmdb:/app/GeoLite2-City.mmdb"
Then, you may set the following variables in your .env
file.
UNSUPPORTED_COUNTRIES=CU,IR,KP,SY,RU # or a comma-separated list of the ISO Alpha-2 codes of countries to be restricted
UNSUPPORTED_CITIES=Luhansk,Donetsk # or a comma-separated list of the names of cities to be restricted
UNSUPPORTED_UKR_SUBDIVISIONS=43,40 # or a comma-separated list of the ISO codes for Ukranian subdivisions to be restricted
docker-compose down
docker-compose up
docker-compose up
will run these migrations (Keep an eye on the logs for migration errors to file a GH issue, you should not have to manually migrate the db)docker exec -it helium_console /bin/bash
, then _build/prod/rel/console/bin/console eval "Console.Release.migrate"
docker-compose build
, you do not have to bring down your server until this completesdocker-compose down
, then run your new build with docker-compose up
docker-compose up
will run these migrations (Keep an eye on the logs for migration errors to file a GH issue, you should not have to manually migrate the db)docker exec -it helium_console /bin/bash
, then _build/prod/rel/console/bin/console eval "Console.Release.migrate"
USER_INVTE_ONLY
to true in your .env fileINSERT INTO users (id, email, password_hash, inserted_at, updated_at) values (1, 'email@provider.com', 'hash', NOW(), NOW());
brew install yarn
)brew install libsodium
)To start your Phoenix server:
mix deps.get
mix ecto.setup
cd assets && yarn
mix phx.server
Now you can visit localhost:4000
from your browser.
If you run into any issues or you have any questions about how to get started contributing, feel free to reach out on the #console
channel in the official Helium Community Discord server!