feat: dockerize app

This commit is contained in:
2024-12-02 00:35:03 +02:00
parent 2272170e5a
commit b3b8637f0e
12 changed files with 218 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
node_modules
build
.dockerignore
Dockerfile

View File

@@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.pyc

View File

@@ -0,0 +1,12 @@
FROM node:16
WORKDIR /app
COPY package*.json ./
COPY yarn.lock ./
RUN yarn install
COPY . .
EXPOSE 3000
CMD ["yarn", "start"]

View File

@@ -59,5 +59,5 @@
"last 1 safari version"
]
},
"proxy": "http://localhost:5000"
"proxy": "http://localhost:3000"
}

View File

@@ -31,7 +31,7 @@ class Tutorial extends Component {
componentDidMount() {
fetch('./new_session_id', {
fetch('http://localhost:8000/new_session_id', {
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
method: 'POST',
body: JSON.stringify({

View File

@@ -178,7 +178,7 @@ class VisQuiz extends Component {
on_survey_click() {
fetch('./record_responses_to_db', {
fetch('http://localhost:8000/record_responses_to_db', {
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' },
method: 'POST',
body: JSON.stringify({