diff --git a/client/Dockerfile b/client/Dockerfile index 8569fc5..38cb524 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,9 +1,12 @@ -FROM node:16.9.1-alpine3.11 +FROM node:16-alpine as build-step +RUN mkdir /app WORKDIR /app -COPY package*.json ./ +ENV PATH /app/node_modules/.bin:$PATH +COPY package*.json /app RUN npm install -# COPY . ./ -EXPOSE 3000 -RUN chown -R node /app/node_modules -USER node -CMD [ "npm", "start"] +COPY . /app +# USER node +RUN npm run build + +FROM nginx:1-alpine +COPY --from=build-step /app/build /usr/share/nginx/html \ No newline at end of file diff --git a/client/package.json b/client/package.json index 6601fe9..30dfccd 100644 --- a/client/package.json +++ b/client/package.json @@ -12,13 +12,14 @@ "react-dom": "^17.0.2", "react-router-dom": "^5.3.0", "react-scripts": "4.0.3", - "web-vitals": "^1.1.2" + "web-vitals": "^1.1.2", + "serve": "^12.0.1" }, "scripts": { - "start": "./node_modules/.bin/react-scripts start", - "build": "./node_modules/.bin/react-scripts build", - "test": "./node_modules/.bin/react-scripts test", - "eject": "./node_modules/.bin/react-scripts eject" + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ diff --git a/docker-compose.yml b/docker-compose.yml index 3b08984..7c38ac2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,23 +3,21 @@ version: "3" services: scouting-client: container_name: "scouting-client" + restart: unless-stopped + env_file: + - .env build: context: ./client dockerfile: ./Dockerfile - env_file: - - .env expose: - - 3000 - - 5000 + - 80 ports: - - "3000:3000" - - "5000:5000" - volumes: - - ./client:/app - + - "80:80/tcp" couchdb: container_name: "scouting-server" restart: unless-stopped + env_file: + - .env build: context: ./server dockerfile: ./Dockerfile @@ -27,8 +25,6 @@ services: - 5984 ports: - "5984:5984" - env_file: - - .env environment: - COUCHDB_HOST=couchdb - COUCHDB_PORT=5984 diff --git a/server/data/.shards/00000000-7fffffff/_users.1632426241_design/mrview/3e823c2a4383ac0c18d4e574135a5b08.view b/server/data/.shards/00000000-7fffffff/_users.1632426241_design/mrview/3e823c2a4383ac0c18d4e574135a5b08.view new file mode 100644 index 0000000..f220093 Binary files /dev/null and b/server/data/.shards/00000000-7fffffff/_users.1632426241_design/mrview/3e823c2a4383ac0c18d4e574135a5b08.view differ diff --git a/server/data/.shards/80000000-ffffffff/_users.1632426241_design/mrview/3e823c2a4383ac0c18d4e574135a5b08.view b/server/data/.shards/80000000-ffffffff/_users.1632426241_design/mrview/3e823c2a4383ac0c18d4e574135a5b08.view new file mode 100644 index 0000000..f220093 Binary files /dev/null and b/server/data/.shards/80000000-ffffffff/_users.1632426241_design/mrview/3e823c2a4383ac0c18d4e574135a5b08.view differ diff --git a/server/data/_dbs.couch b/server/data/_dbs.couch index f9dd853..7d4b21c 100644 Binary files a/server/data/_dbs.couch and b/server/data/_dbs.couch differ diff --git a/server/data/shards/00000000-7fffffff/_users.1632426241.couch b/server/data/shards/00000000-7fffffff/_users.1632426241.couch index fa005d8..7eaedc6 100644 Binary files a/server/data/shards/00000000-7fffffff/_users.1632426241.couch and b/server/data/shards/00000000-7fffffff/_users.1632426241.couch differ diff --git a/server/data/shards/00000000-7fffffff/kcmt2021.1632518243.couch b/server/data/shards/00000000-7fffffff/kcmt2021.1632518243.couch new file mode 100644 index 0000000..43b2f24 Binary files /dev/null and b/server/data/shards/00000000-7fffffff/kcmt2021.1632518243.couch differ diff --git a/server/data/shards/80000000-ffffffff/_users.1632426241.couch b/server/data/shards/80000000-ffffffff/_users.1632426241.couch index 5e10722..81bf68a 100644 Binary files a/server/data/shards/80000000-ffffffff/_users.1632426241.couch and b/server/data/shards/80000000-ffffffff/_users.1632426241.couch differ diff --git a/server/data/shards/80000000-ffffffff/kcmt2021.1632518243.couch b/server/data/shards/80000000-ffffffff/kcmt2021.1632518243.couch new file mode 100644 index 0000000..39d2f06 Binary files /dev/null and b/server/data/shards/80000000-ffffffff/kcmt2021.1632518243.couch differ