-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker container now watches for updates
- Loading branch information
Showing
6 changed files
with
72 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
FROM node:18-alpine | ||
|
||
RUN mkdir -p /home/frontend | ||
|
||
# Set the working directory to where the frontend will live | ||
WORKDIR /frontend | ||
WORKDIR /home/frontend | ||
|
||
# Send over the NPM dependencies from our project | ||
# We should not send over the lock file since NPM can fail if | ||
# using the cache from another machine. See the link below to see why | ||
# https://stackoverflow.com/a/67431349 | ||
COPY package.json /frontend/package.json | ||
COPY package.json ./ | ||
|
||
# Run npm install (this is a fresh install and will be specific to container) | ||
# Again, it has no lock file to build from, so it might take a minute. | ||
RUN npm install | ||
|
||
# Send over the root information into the frontend directory | ||
COPY . /frontend | ||
COPY . . | ||
|
||
# Run npm run build to: | ||
# 1. Compile typescript code (Build will fail if errors are present) | ||
# 2. Compile into ./dist file (will contain the "production" code) | ||
RUN npm run build | ||
# RUN npm run build | ||
|
||
# RUN npx tailwindcss --watch -i ./src/style/globals.css -o ./src/style/output.css & | ||
|
||
# Run a command to preview the production build in ./dist. | ||
# This preview will be the last thing that is run before the container terminates | ||
# Check the documentation if you want to learn more about CMD vs RUN | ||
CMD ["npm", "run", "preview"] | ||
# CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters