Merge branch 'bvander/fix-cic-staff-client-docker' into 'master'

fix issues with build cicada, now it should do auto reload

See merge request grassrootseconomics/cic-internal-integration!250
This commit is contained in:
Blair Vanderlugt 2021-08-19 20:15:22 +00:00
commit c4cb095a29
9 changed files with 29101 additions and 3447 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ build/
.idea .idea
**/.vim **/.vim
docker-stack.yml docker-stack.yml
.npm/

View File

@ -1,6 +1,8 @@
# defining version of the base image # defining version of the base image
FROM node:alpine as build FROM node:alpine as build
RUN apk add --no-cache bash
# defining work directory # defining work directory
WORKDIR /app WORKDIR /app
@ -9,7 +11,7 @@ COPY package*.json .
COPY patch-webpack.js . COPY patch-webpack.js .
# copying rest of project # copying rest of project
RUN --mount=type=cache,target=/app/.npm \ RUN --mount=type=cache,id=npm,target=/app/.npm \
npm set cache /app/.npm && \ npm set cache /app/.npm && \
npm ci npm ci
@ -21,7 +23,7 @@ RUN npm run build:${FRONTEND_ENV}
### STAGE 2: Setup ### ### STAGE 2: Setup ###
# defining nginx image version # defining nginx image version
FROM nginx:alpine FROM nginx:alpine as server
## Remove default nginx website ## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/* RUN rm -rf /usr/share/nginx/html/*

View File

@ -0,0 +1,25 @@
# defining version of the base image
FROM node:alpine
RUN apk add --no-cache bash
# defining work directory
WORKDIR /app
# copying the json files into the image
COPY package*.json .
COPY patch-webpack.js .
# copying rest of project
RUN --mount=type=cache,id=npm,target=/app/.npm \
npm set cache /app/.npm && \
npm ci
COPY . .
EXPOSE 4200
ARG FRONTEND_ENV=dev
# running build script

View File

@ -1,5 +1,6 @@
# CICADA # CICADA
An angular admin web client for managing users and transactions in the CIC network. An angular admin web client for managing users and transactions in the CIC network.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0.

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,6 @@
"e2e": "ng e2e", "e2e": "ng e2e",
"precommit": "npm run format:fix && npm run lint", "precommit": "npm run format:fix && npm run lint",
"postinstall": "node patch-webpack.js", "postinstall": "node patch-webpack.js",
"prepare": "husky install",
"compodoc": "npx compodoc -p tsconfig.doc.json -d docs/compodoc -n CICADA", "compodoc": "npx compodoc -p tsconfig.doc.json -d docs/compodoc -n CICADA",
"typedoc": "npx typedoc --tsconfig tsconfig.json --exclude **/*.spec.ts --out docs/typedoc --name CICADA src", "typedoc": "npx typedoc --tsconfig tsconfig.json --exclude **/*.spec.ts --out docs/typedoc --name CICADA src",
"docs": "npm run typedoc && npm run compodoc" "docs": "npm run typedoc && npm run compodoc"
@ -66,7 +65,7 @@
"codelyzer": "^6.0.0", "codelyzer": "^6.0.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"husky": "^6.0.0", "husky": "^6.0.0",
"jasmine-core": "~3.6.0", "jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
@ -90,7 +89,7 @@
"yargs": "^13.3.2" "yargs": "^13.3.2"
}, },
"lint-staged": { "lint-staged": {
"src/**/*.{js,ts,scss,md,html,json}": ["prettier --write", "git add"], "src/**/*.{js,ts,scss,md,html,json}": ["prettier --write"],
"*.scss": ["stylelint src/**/*.scss"] "*.scss": ["stylelint src/**/*.scss"]
}, },
"husky": { "husky": {

View File

@ -17,9 +17,6 @@
"importHelpers": true, "importHelpers": true,
"target": "es2015", "target": "es2015",
"module": "es2020", "module": "es2020",
"lib": [ "lib": ["es2018", "dom"]
"es2018",
"dom"
]
} }
} }

View File

@ -63,12 +63,15 @@ services:
cicada: cicada:
build: build:
dockerfile: Dockerfile.local
args: args:
FRONTEND_ENV: dev FRONTEND_ENV: dev
target: build ports:
- 4200:4200
command: npm run start:dev command: npm run start:dev
#command: bash -c "while true; do sleep 1; done" # Infinite loop to keep container live doing nothing
volumes: volumes:
- ./apps/cic-staff-client:/app/ - ./apps/cic-staff-client:/app
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set} - traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}

View File

@ -732,3 +732,23 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
command: "/root/start_cic_user_tasker.sh -q cic-ussd -vv" command: "/root/start_cic_user_tasker.sh -q cic-ussd -vv"
auth-proxy-meta:
image: registry.gitlab.com/grassrootseconomics/cic-auth-proxy:latest
environment:
PROXY_HOST: cic-meta-server
PROXY_PORT: "80"
PROXY_PATH_PREFIX: "/"
HTTP_AUTH_ORIGIN: https://meta-auth.dev.grassrootseconomics.net:443
HTTP_AUTH_REALM: GE
ACL_CREDENTIALS_ENDPOINT: http://key-server:8081/
ACL_PATH: /data/acls/F3FAF668E82EF5124D5187BAEF26F4682343F692
GPG_PUBLICKEYS_ENDPOINT: http://key-server:8080/.well-known/publickeys/
GPG_SIGNATURE_ENDPOINT: http://key-server:8080/.well-known/signature/
GPG_TRUSTED_PUBLICKEY_FINGERPRINT: CCE2E1D2D0E36ADE0405E2D0995BB21816313BD5
GPG_HOMEDIR: /usr/local/etc/cic-auth-proxy/.gnupg/
GPG_IMPORT_DIR: /usr/local/etc/cic-auth-proxy/import/
GPG_PUBLICKEY_FILENAME: publickeys.asc
GPG_SIGNATURE_FILENAME: signature.asc
GPG_TRUSTED_PUBLICKEY_MATERIAL: /usr/local/etc/cic-auth-proxy/trusted/trustedpublickey.asc