From the creators of

From the creators of

Clean code presentation

From the creators of

Clean code presentation

and

The Glorious Docker presentation (part 1)

The Glorious Docker presentation

part 2

Current state

commons.js is too big

Without chunking

No commons.js

Total assets size is 132 MB

Aaand it fails on ~3rd deployment without cleaning the Heroku Slug

Compile Assets in Gitlab Runner and then push every file to Heroku

Compile Assets in Gitlab Runner and then push every file to Heroku

FAIL

Create Docker Image with compiled assets and then deploy the Image to Heroku!

  • Created docker-compose.yml file which allows to launch a project using Docker containers (without installation of any dependencies on host machine).

Results

  • Created docker-compose.yml file which allows to launch a project using Docker containers (without installation of any dependencies on host machine).

Results

  • Installed Heroku and Docker in Gitlab Runner.
  • Created docker-compose.yml file which allows to launch a project using Docker containers (without installation of any dependencies on host machine).
  • Installed Heroku and Docker in Gitlab Runner.

Results

  • Building an Image in Docker inside Gitlab Runner uses Docker's cached layers and doesn't install all dependencies all the time.
  • Created docker-compose.yml file which allows to launch a project using Docker containers (without installation of any dependencies on host machine).
  • Installed Heroku and Docker in Gitlab Runner.
  • Building an Image in Docker inside Gitlab Runner uses Docker's cached layers and doesn't install all dependencies all the time.

Results

  • Gitlab Runner creates an Image and pushes it to Heroku.
  • Assets Compilation happens in Gitlab Runner.

Full deployment without cached assets takes up to 15 minutes, but there's no heroku slug🐌 and there're no chunks, e.g. no 600 kb commons.js, only app-specific.js

And if I figure out how to properly do css caching, then deployment time might reduce to 6-7 minutes.

And if I figure out how to properly do css caching, then deployment time might reduce to 6-7 minutes 🚀.

Plans

  • [WIP] Caching assets in Gitlab Runner.
  • [WIP] Make PGBouncer work with Docker Image.
  • Create a tool for QA to easily checkout a branch and launch the project locally. Integrations with platforms should also work since the host is localhost:3000.
Made with Slides.com