Public website of metaspexet.se and internal site haj.metaspexet.se. Still very much work in progress!
A full development environment can be started using docker-compose. This will start a seeded postgres database, a mock login server, a Minio server for file storage, a local imgproxy server and the main Phoenix server.
docker-compose up
Now you can visit localhost:4000
from your browser.
This is considerably more complex, and requires a bit of setup. You will also need access to many environment variables. This is not recommended.
Prerequisites:
- You will need an env variables as defined in
config/.env.example
file. Most notably, you will need aLOGIN_API_KEY
to be able to login. If you wish to interact with media files (images, audio) you will need either an S3 bucket or a Minio server running locally. See thedocker-compose.yml
file for an example of how to run a Minio server locally. - Our images are served by an imgproxy server behind a Cloudfront CDN. You will need to use correct
IMGPROXY_KEY
andIMGPROXY_SALT
env variables set. You can also run a local imgproxy server by runningdocker-compose up imgproxy
.
To start your Phoenix server:
This process requires docker, if you don't have it you can either install it here or follow the general instructions below. If you already have a normal postgres installation on your computer, use the general instructions below.
- Setup environment with
make mac-install-env
- Set correct data in the .env file in config/.env
- Run
make start-dev
, this should open up the website (you will have to reload it the first time)
When you have your docker database running, you can use mix phx.server
to start the server.
- Install dependencies with
mix deps.get
- Install npm dependencies with
cd assets && npm install && cd ..
- Create and migrate your database with
mix ecto.setup
- Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix