VidunderGunder / hot-docker-compose

Using docker-compose for an agnostic and fast way to develop with different types of backends and frontends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ”₯ Hot Docker Compose

Wanna do containerized development with hot reloading?
Here's an approach to get you started.

πŸ•ΈοΈ Services

Each service lives in a repository of their own:

πŸš€ Getting Started

Install Docker

Clone repos:

/bash/shell clone-repos.sh

Start services:

docker-compose up

Stop services:

docker-compose down

πŸ‡ Develop With Docker and Hot Reloading

Start services, and just develop as you normally would

To enable intellisense in VSCode, you can do one of the following:

  • Install packages manually on your machine (see each README.md)
  • Use the Dev Containers extension (WIP)

🐌 Develop Locally

For projects that are not setup to support hot module reloading (HMR) with Docker, you can develop locally and rebuild the containers when you are done.

To develop locally, stop the services you want to make changes in:

Stopping services we want to develop

Here we're stopping the react frontend and the bun backend using Docker Desktop

Start the services you want to develop locally in separate terminals:

# Terminal 1 at ~/docker-bun/
bun i
bun run 
# Terminal 2 at ~/docker-react/
pnpm i
pnpm dev

When you are done, stop them locally, before rebuilding and restarting them in Docker Desktop:

docker-compose up --build

Now all services should be up-to-date with your newest changes and running as containers again.

About

Using docker-compose for an agnostic and fast way to develop with different types of backends and frontends


Languages

Language:Shell 100.0%