Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vidundergunder/hot-docker-compose
Using docker-compose for an agnostic and fast way to develop with different types of backends and frontends
https://github.com/vidundergunder/hot-docker-compose
bun bunjs docker docker-compose dotnet express microservices node nodejs react ts typescript vite
Last synced: 28 days ago
JSON representation
Using docker-compose for an agnostic and fast way to develop with different types of backends and frontends
- Host: GitHub
- URL: https://github.com/vidundergunder/hot-docker-compose
- Owner: VidunderGunder
- Created: 2023-07-26T11:50:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-26T12:03:02.000Z (over 1 year ago)
- Last Synced: 2023-07-26T13:24:33.083Z (over 1 year ago)
- Topics: bun, bunjs, docker, docker-compose, dotnet, express, microservices, node, nodejs, react, ts, typescript, vite
- Language: Shell
- Homepage:
- Size: 134 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π₯ 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:
- [React Frontend](https://github.com/VidunderGunder/docker-react) | TypeScript |Β Vite
- [DotNet Backend](https://github.com/VidunderGunder/docker-dotnet) | C# | .NET6
- [Express Backend](https://github.com/VidunderGunder/docker-express) | TypeScript | Node
- [Bun Backend](https://github.com/VidunderGunder/docker-bun) | TypeScript | Bun## π Getting Started
Install [Docker](https://www.docker.com/)
Clone repos:
```bash
/bash/shell clone-repos.sh
```Start services:
```bash
docker-compose up
```Stop services:
```bash
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](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-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](images/docker-desktop-stop.png)
> 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:
```bash
# Terminal 1 at ~/docker-bun/
bun i
bun run
``````bash
# Terminal 2 at ~/docker-react/
pnpm i
pnpm dev
```When you are done, stop them locally, before rebuilding and restarting them in Docker Desktop:
```bash
docker-compose up --build
```Now all services should be up-to-date with your newest changes and running as containers again.