Skip to content

Instantly share code, notes, and snippets.

@manuelep
Created February 1, 2023 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelep/da202b4137dc09212b46271b6a494690 to your computer and use it in GitHub Desktop.
Save manuelep/da202b4137dc09212b46271b6a494690 to your computer and use it in GitHub Desktop.
compose-svelte-dev

docker-compose -f "docker-compose-dev.yml" up

FROM node:current
WORKDIR /apps
RUN npm create vite@latest myapp -- --template svelte
# RUN npm create svelte@latest myapp
RUN cd myapp && npm install
# RUN cp -r /apps_/ /apps/
WORKDIR /apps/myapp
# npm run dev
version: '3.3'
services:
svelte-env:
build:
# context: backend
dockerfile: ./dev.Dockerfile
ports:
- "5173:5173"
volumes:
- ./apps:/apps_
working_dir: /apps_/myapp
command:
- /bin/sh
- -c
- |
cp -r /apps/* /apps_/
HOST=0.0.0.0 PORT=5173 npm run dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment