Update build-deploy.yml, Dockerfile, Dockerfile.dev, LoginFormController.jsx, docker-compose.prod.yml, and docker-compose.yml

This commit is contained in:
Ceferino Patino 2024-02-19 09:54:41 -06:00
commit 17590cc43d
6 changed files with 8 additions and 12 deletions

View file

@ -32,7 +32,7 @@ jobs:
- name: Write .env to build
env:
DOTENV: '${{ secrets.DOTENV }}'
run: echo "$DOTENV" >> .env
run: echo "$DOTENV" >> ./client/.env
- name: Build & push client image
uses: mr-smithers-excellent/docker-build-push@v6
with:

View file

@ -1,4 +1,4 @@
FROM node:16-alpine as build
FROM node:16-alpine AS build
WORKDIR /app
COPY ["package.json", "./"]
@ -10,7 +10,7 @@ COPY . .
RUN npm run build
FROM node:16-alpine
FROM node:16-alpine AS production
WORKDIR /app
COPY --from=build /app/build ./build

View file

@ -11,4 +11,4 @@ COPY . .
EXPOSE 3000/tcp
CMD ["npm" "run" "start"]
CMD ["npm", "run", "start"]

View file

@ -5,14 +5,10 @@ services:
restart: unless-stopped
build:
context: ./client
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64/v8
image: c4thebomb/know-it-all-client
env_file:
- path: .env
required: true
ports:
- 127.0.0.1:3000:3000
networks:
@ -21,8 +17,7 @@ services:
restart: unless-stopped
image: c4thebomb/know-it-all-server
build:
context: ./client
dockerfile: Dockerfile
context: ./server
platforms:
- linux/amd64
- linux/arm64/v8

View file

@ -9,7 +9,7 @@ services:
ports:
- 3000:3000
volumes:
- ./client:/app
- ./client:/app1
- /app/node_modules
networks:
- know-it-all
@ -17,6 +17,7 @@ services:
REACT_APP_API_ROOT: 'http://localhost:3001/api'
REACT_APP_DOMAIN_ROOT: 'http://localhost:3000'
WATCHPACK_POLLING: true
command: npm start
server:
restart: unless-stopped
build: