Fan Universe
Prerequisites
Running Linux is strongly recommended. You'll likely have to jump through hoops to set the environment up elsewhere.
Docker
Run docker-compose pull
in the project root to fetch all dependencies.
Development tools
Please read the documentation for each plugin; they may require additional dependencies to be installed.
After getting asdf and plugins, run asdf install
in the project root.
Getting up and running
Start containerized services:
docker-compose up
Prepare your environment (you only need to this once):
- Increase the
vm_max_map_count
kernel setting to at least262144
(refer to this article for more information)
# Install dependencies
mix deps.get
( cd assets && npm install && npm run rollup-vendor )
# Temporary hack until FA 5 lands
cp -r assets/node_modules/font-awesome/fonts priv/static
# Set up the database
mix ecto.create && mix ecto.migrate
# Create Elasticsearch indexes
mix run -e "Fanuniverse.ImageIndex \
|> Elasticfusion.IndexAPI.create_index() \
|> IO.inspect()"
# Create local storage dirs
mkdir priv/avatars priv/images priv/cache
Finally:
# Either boot up the server (bound to localhost:4000)...
mix phx.server
# ...or run the test suite.
mix test
# You should _not_ have both running at the same time!