forked from Shift3/react-challenge-project-sep-trial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Shift3/jr-windows-hot-reload
Windows hot reload fix
- Loading branch information
Showing
5 changed files
with
57 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
client: | ||
environment: | ||
CHOKIDAR_USEPOLLING: "true" | ||
|
||
server: | ||
build: | ||
context: "./server" | ||
dockerfile: "Dockerfile.windows" |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:11 | ||
|
||
RUN ln -fs /usr/share/zoneinfo/US/Pacific-New /etc/localtime && dpkg-reconfigure -f noninteractive tzdata | ||
|
||
WORKDIR /home/node/server | ||
|
||
ADD "./package.json" "/home/node/server/package.json" | ||
|
||
RUN ["npm", "install", "nodemon", "-g"] | ||
|
||
RUN ["npm", "install", "opencollective-postinstall", "--save"] | ||
|
||
RUN ["npm", "install", "--no-bin-links", "--no-optional"] | ||
|
||
CMD ["npm", "run", "windows"] |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
unameOut="$(uname -s)" | ||
case "${unameOut}" in | ||
Linux*) machine=Linux;; | ||
Darwin*) machine=Mac;; | ||
CYGWIN*) machine=Cygwin;; | ||
MINGW*) machine=MinGw;; | ||
*) machine="UNKNOWN:${unameOut}" | ||
esac | ||
echo ${machine} | ||
|
||
case ${machine} in | ||
Mac) | ||
echo "Running Mac Startup" | ||
docker compose up | ||
;; | ||
Cygwin) | ||
echo "Running Windows Startup" | ||
docker compose -f "./docker-compose.yml" -f "./docker-compose.windows.yml" up | ||
;; | ||
MinGw) | ||
echo "Running Windows Startup" | ||
docker compose -f "./docker-compose.yml" -f "./docker-compose.windows.yml" up | ||
;; | ||
esac |