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.
Note: ImageMagick is a hard dependency to this application.
To start your this app:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- 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.
Make sure you'll have the following:
- node and
npm
for asset compilation - docker engine 1.10
- docker-compose 1.6.0
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
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: http://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix