Skip to content

Commit

Permalink
project init
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhost committed Nov 15, 2020
0 parents commit 7d8ec25
Show file tree
Hide file tree
Showing 35 changed files with 14,361 additions and 0 deletions.
21 changes: 21 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
14 changes: 14 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:alpine
WORKDIR '/app'
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM nginx
EXPOSE 80
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=0 /app/build /usr/share/nginx/html

# req -> EB: {nginx1(:80) routing to port 3000(nginx2 + pro react) and 5000(express)}
# nginx2 can be replaced: to nginx1 or other service
6 changes: 6 additions & 0 deletions client/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:alpine
WORKDIR '/app'
COPY ./package.json ./
RUN npm install
COPY . .
CMD ["npm", "run", "start"]
2,444 changes: 2,444 additions & 0 deletions client/README.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions client/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
listen 3000;
#proxy / -> upstream client
location / {
#production asset share
root /usr/share/nginx/html;
index index.html index.htm;
#for the workign of React Router
try_files $uri $uri/ /index.html;
}
}
Loading

0 comments on commit 7d8ec25

Please sign in to comment.