fixed docker settings

This commit is contained in:
Sebastian
2021-09-24 17:26:03 -06:00
parent 1efb892053
commit 0acc51dbd2
10 changed files with 23 additions and 23 deletions
+10 -7
View File
@@ -1,9 +1,12 @@
FROM node:16.9.1-alpine3.11 FROM node:16-alpine as build-step
RUN mkdir /app
WORKDIR /app WORKDIR /app
COPY package*.json ./ ENV PATH /app/node_modules/.bin:$PATH
COPY package*.json /app
RUN npm install RUN npm install
# COPY . ./ COPY . /app
EXPOSE 3000 # USER node
RUN chown -R node /app/node_modules RUN npm run build
USER node
CMD [ "npm", "start"] FROM nginx:1-alpine
COPY --from=build-step /app/build /usr/share/nginx/html
+6 -5
View File
@@ -12,13 +12,14 @@
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-router-dom": "^5.3.0", "react-router-dom": "^5.3.0",
"react-scripts": "4.0.3", "react-scripts": "4.0.3",
"web-vitals": "^1.1.2" "web-vitals": "^1.1.2",
"serve": "^12.0.1"
}, },
"scripts": { "scripts": {
"start": "./node_modules/.bin/react-scripts start", "start": "react-scripts start",
"build": "./node_modules/.bin/react-scripts build", "build": "react-scripts build",
"test": "./node_modules/.bin/react-scripts test", "test": "react-scripts test",
"eject": "./node_modules/.bin/react-scripts eject" "eject": "react-scripts eject"
}, },
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
+7 -11
View File
@@ -3,23 +3,21 @@ version: "3"
services: services:
scouting-client: scouting-client:
container_name: "scouting-client" container_name: "scouting-client"
restart: unless-stopped
env_file:
- .env
build: build:
context: ./client context: ./client
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
env_file:
- .env
expose: expose:
- 3000 - 80
- 5000
ports: ports:
- "3000:3000" - "80:80/tcp"
- "5000:5000"
volumes:
- ./client:/app
couchdb: couchdb:
container_name: "scouting-server" container_name: "scouting-server"
restart: unless-stopped restart: unless-stopped
env_file:
- .env
build: build:
context: ./server context: ./server
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
@@ -27,8 +25,6 @@ services:
- 5984 - 5984
ports: ports:
- "5984:5984" - "5984:5984"
env_file:
- .env
environment: environment:
- COUCHDB_HOST=couchdb - COUCHDB_HOST=couchdb
- COUCHDB_PORT=5984 - COUCHDB_PORT=5984
Binary file not shown.