Skip to content

Commit

Permalink
fix: added dotenv for dev purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
YuqiHuai committed Oct 17, 2023
1 parent f4e1e19 commit 4e3015d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ web_modules/
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
Expand Down
1 change: 1 addition & 0 deletions client/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_SERVER_URL=http://localhost
2 changes: 0 additions & 2 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM node

ENV REACT_APP_SERVER_URL="http://localhost"

WORKDIR /app

ADD package.json /app
Expand Down
6 changes: 3 additions & 3 deletions client/src/setupProxy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { createProxyMiddleware } = require('http-proxy-middleware');
const { createProxyMiddleware } = require("http-proxy-middleware");

module.exports = function(app) {
module.exports = function (app) {
app.use(
'/',
"/",
createProxyMiddleware({
target: process.env.REACT_APP_SERVER_URL,
changeOrigin: true,
Expand Down
2 changes: 2 additions & 0 deletions server/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MONGO_URL="mongodb://sorasvl-mongo:27017"
MONGO_DB_NAME="WISE"
3 changes: 0 additions & 3 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ WORKDIR /workdir
RUN npm install
ADD ./ /workdir

ENV MONGO_URL="mongodb://sorasvl-mongo:27017"
ENV MONGO_DB_NAME="WISE"

EXPOSE 3000
RUN ["npm", "run", "build"]
CMD [ "npm", "run", "start" ]

0 comments on commit 4e3015d

Please sign in to comment.