Skip to content

Changelog is news and podcast for developers. This is our open source platform.

License

Notifications You must be signed in to change notification settings

Nezteb/changelog.com

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

changelog.com All Contributors

Read the announcement post!

What is this?

This is the CMS behind changelog.com. It's an Elixir application built with the Phoenix web framework, PostgreSQL, and many other great open source efforts.

Dependencies

  • Elixir 1.13
  • Erlang/OTP 24

Why is it open source?

A few reasons:

  1. We love open source. Our careers (and livelihoods) wouldn't be possible without open source. Keeping it closed just feels wrong.
  2. Phoenix is really great, but it's young enough in its lifecycle that there aren't too many in-production, open source sites for people to refer to as examples or inspiration. We want to throw our hat into that ring and hopefully others will follow.
  3. Changelog is a community of hackers. We know open sourcing the website will lead to good things from y'all (such as bug reports, feature requests, and pull requests).

Should I fork this and use it as a platform?

Probably not. We won't stop you from doing it, but we don't advise it. This is not a general purpose podcasting CMS. It is a CMS that is specific to Changelog and our needs. From the design and layout to the data structures and file hosting, we built this for us. An example of just how custom it is β€” we literally have our podcast names hardcoded in areas of the code. Yuck.

What is it good for?

If you're building a web application with Phoenix (or aspire to), this is a great place to poke around and see what one looks like when it's all wired together. It's not perfect by any means, but it works. And that's something. We've also been told that it is ridiculously fast.

If you have questions about any of the code, holler @Changelog. Better yet, join the community where we have in-depth discussions about software development, industry trends, and everything else under the sun.

How can I contribute?

Assuming that you have Docker running locally and docker-compose available, all that you have to do is run ./start_dev_stack up in your terminal.

When you run this command for the first time, it will take around 7 minutes to pull all Docker images, build the app image and start the app and db containers. Depending on your internet connection and CPUs used for compiling various artefacts, this can easily take 30 minutes or more. Next time you run this command, since all Docker images will be cached, you can expect all containers to be up and running within 30 seconds.

When all containers are up and running, you should see the following output in your terminal session:

Starting dev_docker_postgres_1   ... done
Starting dev_docker_prometheus_1 ... done
Starting dev_docker_grafana_1    ... done
Starting dev_docker_changelog_app_1 ... done
Attaching to dev_docker_prometheus_1, dev_docker_postgres_1, dev_docker_grafana_1, dev_docker_changelog_app_1
...
grafana_1        | t=2021-02-03T20:53:58+0000 lvl=info msg="Starting Grafana" logger=server version=7.1.3 commit=5723d951af branch=HEAD compiled=2020-08-06T08:44:32+0000
grafana_1        | t=2021-02-03T20:53:58+0000 lvl=info msg="Config loaded from" logger=settings file=/usr/share/grafana/conf/defaults.ini
grafana_1        | t=2021-02-03T20:53:58+0000 lvl=info msg="Config loaded from" logger=settings file=/etc/grafana/grafana.ini
...
prometheus_1     | level=info ts=2021-02-03T20:53:58.108Z caller=main.go:308 msg="No time or size retention was set so using the default time retention" duration=15d
prometheus_1     | level=info ts=2021-02-03T20:53:58.109Z caller=main.go:343 msg="Starting Prometheus" version="(version=2.20.1, branch=HEAD, revision=983ebb4a513302315a8117932ab832815f85e3d2)"
...
postgres_1         | LOG:  autovacuum launcher started
postgres_1         | LOG:  database system is ready to accept connections
...
changelog_app_1    | [info] Running ChangelogWeb.Endpoint with Cowboy using http://0.0.0.0:4000
changelog_app_1    | yarn run v1.6.0
changelog_app_1    | warning package.json: No license field
changelog_app_1    | $ webpack --mode=development --watch-stdin --color
changelog_app_1    |
changelog_app_1    | Webpack is watching the files…
...

You can now access a dev copy of changelog.com locally, at http://localhost:4000 or at https://localhost:4001 if you would like to access the HTTPS version.

If you are using Google Chrome as your browser and notice ERR_CERT_AUTHORITY_INVALID errors in your console, you will need to enable Chrome's allow-insecure-localhost flag, which you can do by opening chrome://flags/#allow-insecure-localhost. There will be a log in your terminal warning about this, but it quickly gets hidden by other logs:

dev_docker-changelog_app-1  | * creating priv/cert/selfsigned_key.pem
...
dev_docker-changelog_app-1  | NOTE: when using Google Chrome, open chrome://flags/#allow-insecure-localhost
dev_docker-changelog_app-1  | to enable the use of self-signed certificates on `localhost`.

When you want to stop all Docker containers, press both CTRL and c keys at the same time (Ctrl+C).

Please remember that we have a product roadmap in mind so open an issue about the feature you'd like to contribute before putting the time in to code it up. We'd hate for you to waste any of your time building something that may ultimately fall on the cutting room floor.

How do I import a db backup locally?

First ensure that:

  • the local changelog containers are stopped, i.e. docker-compose down
  • you have an unarchived db backup file in the priv/db directory, e.g. ./priv/db/changelog-201910-2020-01-16T19.36.05Z

Next, run the following commands:

docker-compose up db
# Run in a separate tab/window
docker-compose exec --user postgres db dropdb changelog_dev
docker-compose exec --user postgres db createdb changelog_dev
docker-compose exec --user postgres db psql --file=/app/priv/db/changelog-201910-2020-01-16T19.36.05Z changelog_dev

Finally, stop the db container by pressing both CTRL and c keys and the same time in the window/tab that you have docker-compose up db running.

You can now start the app normally, all changelog.com content at the time the db backup was taken will be available locally.

How to upgrade Elixir?

  1. Pick an image from hexpm/elixir
  2. Update docker/Dockerfile.runtime to use an image from the URL above
  3. Run make runtime-image to publish the new container image
  4. Update docker/Dockerfile.production to the exact runtime version that was published in the previous step
  5. Update 2021/dagger/prod_image/main.cue to the exact runtime version used above
  6. Update dev_docker/changelog.yml to the exact runtime version used above
  7. Update the Elixir version in README.md & mix.exs
  8. Commit and push everything, then wait for the pipeline to deploy everything into production

You may want to test everything locally by running make ship-it from within the 2021 dir. This makes it easy to debug any potential issues locally.

How to build a new container image using Docker Engine running on Fly.io?

Ensure that you have a Fly.io Wireguard Tunnel configured locally. You may also need to install flyctl.

Given an active Fly.io Wireguard tunnel:

  1. Check that the Wireguard tunnel works:
dig +noall +answer _apps.internal txt
_apps.internal.		5	IN	TXT	"changelog-2022-03-13,docker-2022-06-13,old-flower-9005,postgres-2022-03-12"
  1. Configure docker CLI to use Docker Engine running on Fly.io:
export DOCKER_HOST=tcp://[fdaa:0:4556:a7b:21e0:1:1f9d:2]:2375
  1. Check that docker CLI can connect to the remote Docker Engine:
docker info
...
Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Server Version: 20.10.17
...

Any docker commands will now run against this remote Docker Engine now, including make runtime-image.

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contributors

Thanks goes to these wonderful people (emoji key):


Jerod Santo

πŸ’» πŸ“– πŸš‡

Adam Stacoviak

🎨 πŸ’» πŸ’΅

Cody Peterson

🎨 πŸ’»

Jake Stutzman

🎨

Tucker Cowie

πŸ’»

Gerhard Lazu

πŸš‡ πŸ’»

Xinjiang Shao

πŸ“– πŸ’»

Steve Agalloco

πŸ’»

David Gasperoni

πŸ’»

Nathan Youngman

⚠️

Marco Vito Moscaritolo

πŸ’»

0x4e

πŸ’»

Andrea Rossi

πŸ’»

Tonći Galić

πŸš‡

Jearvon Dharrie

πŸ’»

Lee Jarvis


Agusti Fernandez

πŸ’»

Len Payne

πŸ’»

JoeBew42

πŸ’»

Griffin Byatt

πŸ’»

Ridge Frederick

πŸ’» πŸ›

Horst Rutter

πŸ›

Nick Janetakis

πŸ› πŸ’»

Ryan Will

πŸ› πŸ’»

Dennis Reimann

πŸ’»

Juan Soto

πŸ’»

Jordy Zomer

πŸ’»

Kevin Ball

πŸ’»

Mat Ryer

πŸ’»

Yaw Anokwa

πŸ’»

Ilia Choly

πŸ’»

Wojtek Mach

πŸ’»

Owen Bickford

πŸ’» πŸ“

Lars Wikman

πŸ’»

Marcelo Andrade

πŸ’»

Jason Axelson

πŸ’»

Alexander Koutmos

πŸ’»

d-m-u

πŸ›

Parker Selbert

πŸ’»

Haile Lagi

πŸ’»

Noah

πŸ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Changelog is news and podcast for developers. This is our open source platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 37.1%
  • VCL 24.3%
  • HTML 24.0%
  • SCSS 5.8%
  • Makefile 3.9%
  • JavaScript 3.6%
  • Other 1.3%