diff --git a/Dockerfile b/Dockerfile index a9229aaebaf92c111f0a53ee50b8365d2358b76f..0b38c2078ac93e3f1ba9f42ada03e72174146be1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,12 +10,11 @@ COPY ./public ./public COPY package.json yarn.lock package-lock.json ./ # Installing dependencies -RUN npm install - -# Building the application -RUN npm run build +RUN npm install +RUN npm install serve +RUN yarn build # Running EXPOSE 3000 -ENTRYPOINT ["npm", "run", "start"] +ENTRYPOINT ["npm", "run", "deploy"] diff --git a/package.json b/package.json index a7cbdc2d8cd369d2ec15eebf2fab3ecb41106a73..39b111683f6542606deed00f69459e5a6f266bc5 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,10 @@ { "name": "kszkepzes-frontend", "version": "0.2.0", - "proxy": "http://127.0.0.1:8000/", "private": false, "dependencies": { "axios": "^0.19.2", "eslint-plugin-flowtype": "^4.6.0", - "http-proxy-middleware": "^0.20.0", "moment": "^2.24.0", "npm": "^6.13.7", "prop-types": "^15.7.2", @@ -29,7 +27,8 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "deploy": "serve -l 3000 -s build" }, "devDependencies": { "eslint": "6.8.0", diff --git a/public/index.html b/public/index.html index e1b4c45a8f295fe8277db48c22c83ad4e6299089..ac92f4ca6dec6256cb7eceb89aaf0c92143ce782 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ <!doctype html> -<html lang="en"> +<html lang="hu"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> diff --git a/src/components/forms/AddEventForm.js b/src/components/forms/AddEventForm.js index a9dd5d98df4a8e3e717b8ef2003caddc05a3fd46..0bfb97115a067aa196d20b0977ff772661aac1c4 100644 --- a/src/components/forms/AddEventForm.js +++ b/src/components/forms/AddEventForm.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Modal, Button, Form, Input, TextArea, Icon } from 'semantic-ui-react'; +import { Modal, Button, Form, Input, Icon } from 'semantic-ui-react'; import { connect } from 'react-redux'; import { DateTimeInput } from 'semantic-ui-calendar-react'; import { writeEvent, eventDate, addEvent } from '../../actions/statistics' @@ -25,7 +25,7 @@ class AddEventForm extends Component { } render() { - const { name, date, description } = this.props.newEvent; + const { name, description } = this.props.newEvent; return ( <Modal open={this.state.showModal} diff --git a/src/components/forms/ConfirmModal.js b/src/components/forms/ConfirmModal.js index 39982524778006648790b533cd237f6668f8864e..91a68e2b79d19beb0acaa4499f9868f061bc91b5 100644 --- a/src/components/forms/ConfirmModal.js +++ b/src/components/forms/ConfirmModal.js @@ -37,7 +37,6 @@ class ConfirmModal extends Component { basic color='red' inverted - inverted onClick={() => this.close()} > <Icon name='remove' /> Nem diff --git a/src/setupProxy.js b/src/setupProxy.js deleted file mode 100644 index 539efe34da9734a7f4f023b167e654af53ecc100..0000000000000000000000000000000000000000 --- a/src/setupProxy.js +++ /dev/null @@ -1,6 +0,0 @@ -const proxy = require('http-proxy-middleware'); - -module.exports = function(app) { - app.use(proxy('/api', { target: 'http://127.0.0.1:8000/' })) - app.use(proxy('/media', { target: 'http://127.0.0.1:8000/' })) -};