-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker build does not rebuild frontend #10
Comments
Thank you for the feedback. I will research this topic a bit more. The biggest challenge is how to easily deploy to Heroko/Google App Engine. At the moment you can just push source and it will work (because the build is included in the source). |
I added build support for For now, I didn't remove FROM node:12
WORKDIR /usr/app
COPY package*.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src/ src/
RUN npm run build
COPY frontend/package*.json frontend/
RUN npm ci --prefix frontend/
COPY frontend/tsconfig.json frontend/
COPY frontend/src/ frontend/src/
COPY frontend/public/ frontend/public/
RUN npm run --prefix ./frontend build && rm -rf ./frontend/node_modules
EXPOSE 3000
CMD node lib/index.js |
Great to see it, thanks. Some feedback:
Other that the above feedback, the image works wonderfully. Great job! |
As I've started to tinker with the code to do an easy frontend test, I could not even make the code run.
In my case, I rely exclusively on Docker to develop (hack/docker build/test/repeat). I don't have NodeJS toolchain installed on my OS, so I can work on any version (and even on any language) without breaking my PC.
I tried some easy frontend changes and it kept me puzzled for a while until I've finally realized that (as stated in the readme for normal development), the Docker build also does not rebuild frontend
build
dir.I've done my best and tried to fix it by just following the frontend readme documentation and some googling, but it's way off my abilities (I'm neither a NodeJS dev nor frontend guy).
I think that Docker build should also rebuild frontend files always.
So, after banging my head for a few hours, I'm filing this issue.
Also, I guess that the
build
dir should not be commited in the repo.I think it's preferable the run to fail loud out of the box instead of silently working with an outdated frontend. Also applies for any files that should be created by the build/CI process.
The text was updated successfully, but these errors were encountered: