I'm trying to setup a devcontainer but I'm having one really weird issue. When I make a change the app will briefly reflect the change before reverting. I have attached a gif showing this behavior. Below are my docker and solidstart configs. The browser logs are empty and as you can see there isn't anything in the server logs that can't be gleamed from the behavior.
Any idea on how to fix this issue or any thoughts on what I should do next troubleshooting wise?
Notes:
- The "app" service is the one that solidstart is running on.
- The "devcontainer" script is simply
pnpm install --shamefully-hoist && vinxi dev
docker-compose.yml:
version: '3'
services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../:/workspaces/burchill-dev
- /workspaces/burchill-dev/clients/web/node_modules
# Overrides default command so things don't shut down after the process ends.
entrypoint: /usr/local/share/docker-init.sh
command: sleep infinity
app:
build:
context: ../clients/web
dockerfile: Dockerfile
volumes:
- ../clients/web:/root/web
- /root/web/node_modules
ports:
- 3000:3000
- 4000:4000
Dockerfile:
FROM node:lts
RUN npm install -g pnpm
RUN pnpm config set store-dir /.pnpm-store
WORKDIR /root/web
EXPOSE 3000
EXPOSE 4000
CMD ["pnpm", "devcontainer"]
app.config.ts:
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
vite ({ router }) {
if (router === "client") {
return {
server: {
hmr: {
port: 4000,
},
watch: {
usePolling: true,
}
},
};
}
return {};
}
});