Skip to content

floriank/kitteh-phoenix

Repository files navigation

Kitteh

This is a Phoenix project for demonstration purposes. It relates to the article series "Using Phoenix with Docker". It's a simple image uploader that uses a PostgreSQL database for metadata about images and Phonix as a web framework.

Please visit my blog for more articles. If you don't feel like that (or are too smart to fall for that shameless plug), you can still browse the code here and maybe create some pull requests to make it better, since this is obviously not perfect.

Instructions to run

Note: ImageMagick is a hard dependency to this application.

To start your this app:

  1. Install dependencies with mix deps.get
  2. Create and migrate your database with mix ecto.create && mix ecto.migrate
  3. Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Instructions to run via docker-compose

Make sure you'll have the following:

npm i
./node_modules/.bin/brunch build --production
docker-compose up

should do the trick. Once the servers are running, use

docker-compose run web mix ecto.migrate
docker-compose run web mix phoenix.digest -o /var/assets

to migrate the database and digest assets

Learn more