Skip to content

Commit e2628c5

Browse files
authored
Add docker compose development template
1 parent 9311622 commit e2628c5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/integrations/docker.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,24 @@ CMD ["./bun", "src/index.ts"]
7070
7171
EXPOSE 3000
7272
```
73+
74+
## Development
75+
76+
To develop with Elysia in Docker, you can use the following minimal docker compose template:
77+
78+
```yaml
79+
# docker-compose.yml
80+
version: '3.9'
81+
82+
services:
83+
app:
84+
image: "oven/bun"
85+
# override default entrypoint allows us to do `bun install` before serving
86+
entrypoint: []
87+
# execute bun install before we start the dev server in watch mode
88+
command: "/bin/sh -c 'bun install && bun run --watch src/index.ts'"
89+
# expose the right ports
90+
ports: ["3000:3000"]
91+
# setup a host mounted volume to sync changes to the container
92+
volumes: ["./:/home/bun/app"]
93+
```

0 commit comments

Comments
 (0)