diff options
| author | Adam Malczewski <[email protected]> | 2026-03-10 16:18:48 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-10 16:18:48 +0900 |
| commit | e542742c0525ec0971eb89daaf3e8fc1b30e48fb (patch) | |
| tree | 8dd9546e1af05832de8ca5bff1fd9165b0c5da39 /docker-compose.yml | |
| download | tirecalc-e542742c0525ec0971eb89daaf3e8fc1b30e48fb.tar.gz tirecalc-e542742c0525ec0971eb89daaf3e8fc1b30e48fb.zip | |
project init
Diffstat (limited to 'docker-compose.yml')
| -rw-r--r-- | docker-compose.yml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3d98bf1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------- +# docker-compose.yml — One-command dev environment for the app. +# +# Key points: +# • `volumes` bind-mounts the project root into /app so file changes on +# the host are instantly visible inside the container (live reload). +# • An anonymous volume for node_modules prevents the host's +# node_modules from overriding the container's (they may differ by OS). +# • `ports` maps container 5173 → host 5173 so you can open the app +# at http://<host-ip>:5173 from any machine on your LAN. +# -------------------------------------------------------------------------- + +services: + dev: + build: + context: . + dockerfile: Dockerfile + ports: + - "5173:5173" + volumes: + # Mount the entire project directory into the container + - .:/app + + # Keep container's node_modules separate from the host's. + # This anonymous volume is created once, then reused across restarts. + - /app/node_modules + environment: + # Tells Vite / chokidar to use polling for file-change detection, + # which is required when code lives on a bind-mounted volume. + - CHOKIDAR_USEPOLLING=true + # Keep stdin open so we can interact if needed (e.g. Ctrl-C) + stdin_open: true + tty: true |
