Publish your writing effortlessly. All you need is email.
The easiest way to get Pagecord running locally is with Docker.
First, install Docker Desktop and make sure it's running.
Then:
git clone https://github.com/lylo/pagecord.git
cd pagecord
docker-compose up
This will:
- Start PostgreSQL, Redis, and Memcached containers
- Build and run the Rails app
- Set up the database automatically
You can view the app at http://localhost:3000. It's configured to use lvh.me
, so you can view individual blogs on their respective subdomains, e.g. http://joel.lvh.me:3000.
# Rails console
docker-compose exec web bin/rails console
# Run tests
docker-compose exec web bin/rails test
docker-compose exec web bin/rails test:system
# Run migrations
docker-compose exec web bin/rails db:migrate
# Process emails (debug)
docker-compose exec web bash -c "DIR=tmp/emails rake email:load"
If you prefer to run Rails natively without Docker:
Click to expand native setup instructions
Install Ruby 3.4.5+ using HomeBrew and rbenv.
bundle install
rails db:setup
brew install redis postgresql
bin/dev
Run tests:
bin/rails test
bin/rails test:system
Sometimes you'll need to debug emails. To do this, save the .eml file(s) to a folder
such as tmp/emails
.
You can then run the following command which will parse all the .eml files in that
folder and create posts for the first user account in the seed data ([email protected]
).
DIR=tmp/emails rake email:load
Read about the Pagecord architecture or making contributions.
Follow the Pagecord blog.