Compare commits

...

2 Commits

21 changed files with 29203 additions and 3456 deletions

View File

@ -95,10 +95,10 @@ root@7f2607af31c3:/app#
#### Test running stack #### Test running stack
If your stack is already up and you just want to run the tests, you can use:
```bash ```bash
docker-compose exec data-seeding /script/run_ussd_user_imports.sh docker-compose exec -T some-container bash /script/start-tests.sh
``` ```

View File

@ -10,7 +10,7 @@ COPY requirements.txt .
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433" ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ RUN --mount=type=cache, id=pip, mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \ pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \ --extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt -r requirements.txt

View File

@ -14,7 +14,7 @@ ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages
# --extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \ # --extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
# -r requirements.txt # -r requirements.txt
COPY *requirements.txt ./ COPY *requirements.txt ./
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \ pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY \ --extra-index-url $GITLAB_PYTHON_REGISTRY \
--extra-index-url $EXTRA_INDEX_URL \ --extra-index-url $EXTRA_INDEX_URL \

View File

@ -8,7 +8,7 @@ RUN apk add --no-cache postgresql bash
# copy the dependencies # copy the dependencies
COPY package.json package-lock.json . COPY package.json package-lock.json .
RUN --mount=type=cache,mode=0755,target=/root/.npm \ RUN --mount=type=cache,id=npm,mode=0755,target=/root/.npm \
npm set cache /root/.npm && \ npm set cache /root/.npm && \
npm ci npm ci

View File

@ -7,7 +7,7 @@ ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
COPY requirements.txt . COPY requirements.txt .
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \ pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \ --extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt -r requirements.txt

View File

@ -0,0 +1,2 @@
8623625b230f01ecccf2ac4f6536a66608beb436 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/npm","integrity":"sha512-G4vAzedojYXic2YrMdq+vWpvZ+Zc/gSFai+AY2lCKCSNCEOFjgTjzk+wp8j66OfEMBawP7JevWz6ANLjaHUJpQ==","time":1629402913363,"size":1653772,"metadata":{"time":1629402912560,"url":"https://registry.npmjs.org/npm","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Thu, 19 Aug 2021 19:55:12 GMT","etag":"\"bd87307eb91c51dccc1b6e0985432183\"","last-modified":"Thu, 19 Aug 2021 17:32:03 GMT","vary":"accept-encoding, accept"}}}

View File

@ -0,0 +1,47 @@
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start:dev' ]
1 info using npm@7.20.3
2 info using node@v16.7.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 6ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 4ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/app/.npmrc Completed in 2ms
10 timing config:load:project Completed in 5ms
11 timing config:load:file:/root/.npmrc Completed in 4ms
12 timing config:load:user Completed in 4ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 26ms
19 timing npm:load:configload Completed in 26ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 3ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 6ms
25 timing npm:load Completed in 40ms
26 timing config:load:flatten Completed in 8ms
27 timing command:run-script Completed in 176849ms
28 notice New minor version of npm available! 7.20.3 -> 7.21.0
28 notice Changelog: <https://github.com/npm/cli/releases/tag/v7.21.0>
28 notice Run `npm install -g npm@7.21.0` to update!
29 verbose stack Error: command failed
29 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
29 verbose stack at ChildProcess.emit (node:events:394:28)
29 verbose stack at maybeClose (node:internal/child_process:1064:16)
29 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
30 verbose pkgid cic-staff-client@0.0.0
31 verbose cwd /app
32 verbose Linux 5.10.25-linuxkit
33 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start:dev"
34 verbose node v16.7.0
35 verbose npm v7.20.3
36 error path /app
37 error command failed
38 error signal SIGTERM
39 error command sh -c ng serve -c dev
40 verbose exit 1

View File

@ -0,0 +1,44 @@
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start:dev' ]
1 info using npm@7.20.3
2 info using node@v16.7.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 6ms
6 timing config:load:builtin Completed in 7ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/app/.npmrc Completed in 9ms
10 timing config:load:project Completed in 15ms
11 timing config:load:file:/root/.npmrc Completed in 2ms
12 timing config:load:user Completed in 2ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 32ms
19 timing npm:load:configload Completed in 33ms
20 timing npm:load:setTitle Completed in 1ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 3ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 4ms
25 timing npm:load Completed in 43ms
26 timing config:load:flatten Completed in 7ms
27 timing command:run-script Completed in 450289ms
28 verbose stack Error: command failed
28 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
28 verbose stack at ChildProcess.emit (node:events:394:28)
28 verbose stack at maybeClose (node:internal/child_process:1064:16)
28 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
29 verbose pkgid cic-staff-client@0.0.0
30 verbose cwd /app
31 verbose Linux 5.10.25-linuxkit
32 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start:dev"
33 verbose node v16.7.0
34 verbose npm v7.20.3
35 error path /app
36 error command failed
37 error signal SIGTERM
38 error command sh -c ng serve -c dev
39 verbose exit 1

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

@ -12,7 +12,7 @@ ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
COPY requirements.txt . COPY requirements.txt .
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \ pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \ --extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt -r requirements.txt

View File

@ -33,7 +33,7 @@ ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG EXTRA_PIP_ARGS="" ARG EXTRA_PIP_ARGS=""
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
ARG pip_trusted_host=pypi.org ARG pip_trusted_host=pypi.org
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \ RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \ pip install --index-url https://pypi.org/simple \
--force-reinstall \ --force-reinstall \
--trusted-host $pip_trusted_host \ --trusted-host $pip_trusted_host \

View File

@ -15,7 +15,7 @@ COPY requirements.txt .
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433" ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install \ RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip pip install \
--extra-index-url $GITLAB_PYTHON_REGISTRY \ --extra-index-url $GITLAB_PYTHON_REGISTRY \
--extra-index-url $EXTRA_INDEX_URL -r requirements.txt --extra-index-url $EXTRA_INDEX_URL -r requirements.txt

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