docker file and notes update

master
Tudor Stanciu 2020-12-27 00:05:21 +02:00
parent 85387c15fe
commit b6745b60f4
3 changed files with 52 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# build environment # build environment
FROM node:12 as builder FROM node:12-slim as builder
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
@ -9,7 +9,7 @@ COPY . ./
RUN npm run build RUN npm run build
# production environment # production environment
FROM node:12 FROM node:12-slim
RUN printf '\n\n- Copy application files\n' RUN printf '\n\n- Copy application files\n'
ARG APP_SUBFOLDER=network-resurrector ARG APP_SUBFOLDER=network-resurrector

View File

@ -1,3 +1,15 @@
#######################################################################################################################################################
Azure DevOps Repository Password: nih65lpohjpmyru3sarcsg62rc26nknsksi7fqo7bas37ssqhpna
#######################################################################################################################################################
***********
** INFO: **
***********
In gridul de retea, pe fiecare linie va fi un buton care va deschide un log. In gridul de retea, pe fiecare linie va fi un buton care va deschide un log.
Log-ul va fi popup iar continutul lui poate fi ultima componenta de aici https://material-ui.com/components/app-bar/ Log-ul va fi popup iar continutul lui poate fi ultima componenta de aici https://material-ui.com/components/app-bar/
************************************************************************************************************************** **************************************************************************************************************************
https://medium.com/@tacomanator/environments-with-create-react-app-7b645312c09d
https://create-react-app.dev/docs/adding-custom-environment-variables/
https://stackoverflow.com/questions/55690143/what-is-the-difference-between-env-local-and-env-development-local

View File

@ -1 +1,37 @@
#test #######################################################################################################################################################
Docker commands:
*****************
Create image:
--from solution folder:
docker image build -t "network-resurrector-frontend:1.0.0" .
Run image:
docker run -p 5053:80 -it network-resurrector-frontend:1.0.0
Push image to registry:
--tag image
docker tag network-resurrector-frontend:1.0.0 cloud.canister.io:5000/tstanciu/network-resurrector:frontend-1.0.0
--login to registry
docker login --username=tstanciu --password="***REMOVED***" cloud.canister.io:5000
--push image
docker push cloud.canister.io:5000/tstanciu/network-resurrector:frontend-1.0.0
Pull image from registry
--login to registry with readonly rights
docker login --username=deploy+tstanciu --password=***REMOVED*** cloud.canister.io:5000
--pull image
docker pull cloud.canister.io:5000/tstanciu/network-resurrector:frontend-1.0.0
Run container in prod env
docker run --restart=always -p 5009:80 -d cloud.canister.io:5000/tstanciu/network-resurrector:frontend-1.0.0
Rename container
docker rename <container_id> network-resurrector-frontend
#######################################################################################################################################################
Docker container last version: 1.0.0
#######################################################################################################################################################