Welcome to the Montreal Elixir Community website
You've found the source code for our community website: http://www.montrealelixir.ca. You lucky devil! The website is a single-page application aggregating several of our online properties:
The application is built using:
- Elixir: a dynamic, functional language designed for building scalable and maintainable applications, and
- Phoenix Framework: a productive web framework that does not compromise speed and maintainability.
The website has three main purposes:
- Promote the Elixir community in Montreal
- Inform the community members about events and new content
- Provide an opportunity to learn about Elixir and Phoenix by contributing to an open source project (do it!)
These instructions will get you a copy of the application up and running on your local machine for development and testing purposes.
See Hosting and Deployment for notes on how to deploy the application on a live system.
You have two options for your development setup:
- Docker-based: Setup in a Docker container
- Bare-metal: Setup directly on the OS (to be documented)
Docker-based Development Setup
git clone https://github.com/montrealelixir/website cd website make app.config # Configure the access keys, see: "External API Access Keys" below make
To run the tests:
To view the application with your browser visit:
make app.console http://localhost:4000
Other helpful commands:
# Execute any command against the application container, change CMD make app.do CMD='mix test' # Start the docker container make docker.start # Stop the docker container make docker.stop # To stop and remove all volumes (including sync volume) make docker.clean
External API Access Keys
Montreal Elixir website depends on twitter feed to deliver recent tweets from @montrealelixir. To enable it in development, you will need to create an app in your own twitter account.
The following steps assume you already have a working twitter account that has email and mobile phone number confirmed (Twitter does not generate API keys if these prerequisites are not met).
Go to https://apps.twitter.com/.
Create New App.
From the created app page, go to "Keys and Access Tokens" tab.
Create Access Token.
(Optionally) change app permissions to Read Only (montrealelixir app only reads tweets from user's timeline).
Put the generated keys in your
Start the server locally:
The landing page should contain the latest tweets from the configured account. If you tweet something new and it should appear on the web page.
Go to the Credentials page.
Hit "Create" and Proceed with creating new project.
Hit "Create credentials" > API key.
Put the generated key in your
From project's dashboard hit "Enable APIs and Services", search for YouTube Data API and enable it.
Start the server locally:
https://montreal-elixir-staging.herokuapp.com is setup to be automatically deployed when a PR
is merged into
master and the CI passes, see Heroku's Pipelines documentation.
montreal-elixir-staging can be manually deployed:
make -f env/staging/Makefile deploy
montreal-elixir-production) can only be manually deployed (i.e
the "Promote to Production" in the Heroku Pipeline cannot be used for container stacks):
make -f env/prod/Makefile deploy
Learn more about Phoenix Framework
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix
The application is built by our community members like you. If you wish to contribute please review our CONTRIBUTING.md to help you get started. If you have never contributed to open source before, How to Contribute to Open Source is good resource to read first. If you need some extra help to get started, please reach our to the community organizers and members. We are here to help.
Hosting and Deployment
This application is licensed under the MIT License - see the MIT-LICENSE.md file for details.