Skip to content

giantmonkey/tilex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tilex - Today I Learned in Elixir

Hosting

Scale Gigalixir up again

gigalixir ps:scale --replicas=1

Installation

If you are creating your own version of the site, fork the repository and clone your fork:

$ git clone https://github.com/<your_github>/tilex
$ cd tilex

Then, install Erlang, Elixir, Node, and PostgreSQL. asdf can do this in a single command:

$ asdf install

From here, we recommend using make:

$ make
$ make setup server

To do everything by hand, source your environment variables, install dependencies, and start the server:

$ cp .env{.example,}
$ source .env
$ mix deps.get
$ mix ecto.setup
$ npm install --prefix assets
$ mix phx.server

Want to start with an empty database? Skip the seeds by running mix ecto.create && mix ecto.migrate in place of mix ecto.setup.

Now you can visit http://localhost:4000 from your browser.

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

$ PORT=4444 mix phx.server

Authentication

Authentication is managed by Ueberauth and Google. See the ueberauth_google README and Google Oauth 2 docs for instructions. To allow users from a domain and/or comma-separated allowlist, set those configurations in your environment:

# .env

export GOOGLE_CLIENT_ID="your-key.apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="yoursecret"
export HOSTED_DOMAIN="your-domain.com"
export GUEST_AUTHOR_ALLOWLIST="joedeveloper@otherdomain.com, suziedeveloper@freelancer.com"

Once set, visit http://localhost:4000/admin and log in with an email address from your permitted domain.

Tilex creates a new user on the first authentication, and then finds that same user on subsequent authentications.

Testing

Wallaby relies on ChromeDriver; install it via your method of choice. Then, run tests with:

$ make test

or:

$ mix test

Deployment

Hashrocket's Tilex is deployed to Heroku. These are Hashrocket's deployed instances:

This project contains Mix tasks to deploy our instances; use as follows:

$ mix deploy <environment>

Contributing

Please see CONTRIBUTING for more information. Thank you to all of our contributors.

Code of Conduct

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. Please see CODE OF CONDUCT for more information.

Usage

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

License

Tilex is released under the MIT License.opensource.org/licenses/MIT). Please see LICENSE for more information.


About

Hashrocket logo

Tilex is supported by the team at Hashrocket, a multidisciplinary design and development consultancy If you'd like to [work with us][hire-us] or [join our team][join-us], don't hesitate to get in touch.

Packages

No packages published

Languages

  • Elixir 61.3%
  • HTML 20.5%
  • SCSS 12.4%
  • JavaScript 5.4%
  • Other 0.4%