Skip to content
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

Restructure to single deploy #26

Merged
merged 37 commits into from
Jul 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d251aa3
WIP Begin restructure process
burtonr Jun 2, 2022
d52c2fc
Update gitignore for root level package.json
burtonr Jun 3, 2022
c956324
Update MongoDB connection config
burtonr Jun 3, 2022
24801b3
Add auth middleware and move image module to services folder
burtonr Jun 3, 2022
70d8bc0
Add DB initialization for roles and default admin user
burtonr Jun 7, 2022
9ba7e3c
Add auth routes to server with signin path
burtonr Jun 7, 2022
f1948b2
Update login to return role name and fix bug in dash post
burtonr Jun 7, 2022
c447c55
Add authorization middleware for admin and editor
burtonr Jun 8, 2022
5d08a58
Add admin routes to create users
burtonr Jun 8, 2022
63de0d5
Add TODO comments for later before I forget
burtonr Jun 8, 2022
aec9a5b
Add put and delete routes to API. Remove old server code
burtonr Jun 14, 2022
f8d2f45
Add webpack scripts and get client rendering
burtonr Jun 15, 2022
08aaece
Render itemGrid and update to React createRoot
burtonr Jun 16, 2022
59e3de3
Update readme and set proper watch script
burtonr Jun 16, 2022
b0a063c
Initial updates to re-implement login logout functionality
burtonr Jun 16, 2022
646e3bf
WIP move login dialog and navbar clicks to app
burtonr Jun 20, 2022
fd421b9
Style the login dialog
burtonr Jun 21, 2022
993b72d
Use arrow functions and remove login dialog references where no longe…
burtonr Jun 22, 2022
0b27860
Initial rer-implementation of Add/Edit dialog
burtonr Jun 23, 2022
25a851f
Update edit dialog and add group selection
burtonr Jun 24, 2022
3feb2a9
Remove edit dialog from navbar and use props for logout
burtonr Jun 27, 2022
3af388e
Raise manage mode to App to pass as props below
burtonr Jun 27, 2022
192e56c
Update itemCard to component class and pass manageMode down
burtonr Jun 27, 2022
ba6ccc5
Add new dialog to separate add and edit
burtonr Jun 29, 2022
0ac40c9
Add trigger prop to App to reload items on add. Reload items on edit
burtonr Jun 29, 2022
ebe655f
Add error handling in App with alert snackbar
burtonr Jul 1, 2022
75a553e
Fix code errors in API with new function/service name
burtonr Jul 3, 2022
93ce980
Remove extra console logs in add component
burtonr Jul 3, 2022
581d9d0
Re-implement edit call in UI
burtonr Jul 3, 2022
2c8ea7c
Add refresh function to disable cache control. Pass item errors up
burtonr Jul 3, 2022
99f40bb
Remove group code to implement later on
burtonr Jul 4, 2022
1b828f9
Remove dotenv and use only as dev dependency
burtonr Jul 4, 2022
e9ca728
Add nodemon dev dependency to watch server as well
burtonr Jul 4, 2022
eb92065
Add DISABLE_AUTH env var to skip auth for anonymous access
burtonr Jul 4, 2022
d81487e
Add functionality to disable auth
burtonr Jul 10, 2022
f7d6c29
Remove unused code and console log
burtonr Jul 10, 2022
33dd209
Remove front-end from compose and expose port
burtonr Jul 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT=4040
MONGO_URI="mongodb://mongo:secretPassword@mongo"
API_KEY="something-secret"
25 changes: 5 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
# dependencies
**/*/node_modules
/node_modules
/.pnp
.pnp.js

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

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Client
client/src/config/*.json
!client/src/config/default.json
!client/src/config/docker.json

# testing
client/coverage

# production
client/build

# Server
server/src/config/*.json
!server/src/config/default.json
!server/src/config/docker.json
# compiled
public/*.js
public/*.txt
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# FROM node:16-alpine as build
# WORKDIR /app

# COPY package*.json ./
# COPY public/ ./public/

# RUN npm ci --silent
# RUN npm install react-scripts@4.0.3 -g --silent

# COPY src/ ./src/

# RUN npm run build

# FROM nginx:stable-alpine
# RUN apk add --no-cache jq

# COPY --from=build /app/build /usr/share/nginx/html
# EXPOSE 80

# COPY docker-entrypoint.sh /
# ENTRYPOINT ["/docker-entrypoint.sh"]
# CMD ["nginx", "-g", "daemon off;"]

# FROM node:16-alpine
# WORKDIR /server

# ENV NODE_ENV=docker

# RUN chown node:node /server
# USER node

# COPY --chown=node:node src/package*.json ./

# RUN npm install

# COPY --chown=node:node src/ ./

# CMD ["node", "server.js"]
6 changes: 6 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
1 change: 0 additions & 1 deletion client/.env

This file was deleted.

22 changes: 0 additions & 22 deletions client/Dockerfile

This file was deleted.

74 changes: 0 additions & 74 deletions client/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions client/docker-entrypoint.sh

This file was deleted.