Skip to content

energizedwork/tilex

 
 

Repository files navigation

Tilex - Today I Learned

Today I Learned is an open-source project that originated from the team at Hashrocket and catalogues the sharing & accumulation of knowledge as it happens day-to-day. Posts have a 200-word limit, and posting is open to any Rocketeer as well as select friends of the team. We hope you enjoy learning along with us.

This site was open-sourced as a window into the development process, as well as to allow people to experiment with the site on their own and contribute to the project.

Installation

Assuming you have an Elixir installation. Then install the Phoenix Dependencies and PostgreSQL.

Next, follow these setup steps (includes database seeds):

$ git clone https://github.com/energizedwork/tilex
$ cd tilex
$ mix deps.get
$ mix ecto.setup
$ cd assets && npm install
$ cd ..
$ mix phoenix.server

Now you can visit localhost:4000 from your browser.

To serve the app at a different port, include the PORT environment variable when starting the server:

$ PORT=4444 mix phoenix.server

To set environmental variables, copy the example file:

$ cp .env{.example,}

Then, set your variables and source them:

$ source .env

Testing

Wallaby relies on PhantomJS; install it:

$ npm install -g phantomjs

Run the tests with:

$ mix test

Deployment

The app has a continuous delivery pipeline on Heroku.

Pushes to Github master → Heroku CI → Staging deploy.

Review changes and then manually promote to Production when ready.

These are the Tilex deployed instances:

Database migrations require telling Heroku how many pools to use. Here's an example:

$ heroku run "POOL_SIZE=2 mix ecto.migrate"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make some changes with accompanying tests
  4. Ensure the entire test suite passes (mix test)
  5. Stage the relevant changes (git add --patch)
  6. Commit your changes (git commit -m 'Add some feature')
  7. Push to the branch (git push origin my-new-feature)
  8. Create new Pull Request

Adding a database migration? Ensure it can be rolled back with this command:

$ mix ecto.twiki

Bug reports and pull requests are welcome on GitHub at https://github.com/hashrocket/tilex. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Usage

We love seeing forks of Today I Learned in production! Please consult our usage guide for guidelines on appropriate styling and attribution.

License

Tilex is released under the MIT License.


About

EW logo

Tilex is supported by the team at Energized Work, a creative technology and product innovation lab making remarkable things out of the internet. If you'd like to work with us or join our team, don't hesitate to get in touch.

Packages

No packages published

Languages

  • Elixir 58.4%
  • HTML 19.0%
  • CSS 16.3%
  • JavaScript 6.3%