Rehabilitate cic-user-server
This commit is contained in:
parent
24385ea27d
commit
0b2f22c416
@ -1,16 +1,16 @@
|
|||||||
# syntax = docker/dockerfile:1.2
|
FROM node:15.3.0-alpine3.10
|
||||||
#FROM node:15.3.0-alpine3.10
|
#FROM node:lts-alpine3.14
|
||||||
FROM node:lts-alpine3.14
|
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
RUN apk add --no-cache postgresql bash
|
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,mode=0755,target=/root/.npm \
|
||||||
npm set cache /root/.npm && \
|
RUN npm set cache /root/.npm && \
|
||||||
npm ci
|
npm cache verify && \
|
||||||
|
npm ci --verbose
|
||||||
|
|
||||||
COPY webpack.config.js .
|
COPY webpack.config.js .
|
||||||
COPY tsconfig.json .
|
COPY tsconfig.json .
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# syntax = docker/dockerfile:1.2
|
ARG DOCKER_REGISTRY="registry.gitlab.com/grassrootseconomics"
|
||||||
FROM registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev-55da5f4e as dev
|
|
||||||
|
FROM $DOCKER_REGISTRY/cic-base-images:python-3.8.6-dev-55da5f4e
|
||||||
|
|
||||||
RUN apt-get install -y redis-server
|
RUN apt-get install -y redis-server
|
||||||
# create secrets directory
|
# create secrets directory
|
||||||
RUN mkdir -vp pgp/keys
|
RUN mkdir -vp pgp/keys
|
||||||
@ -8,28 +10,33 @@ RUN mkdir -vp pgp/keys
|
|||||||
RUN mkdir -vp cic-ussd
|
RUN mkdir -vp cic-ussd
|
||||||
RUN mkdir -vp data
|
RUN mkdir -vp data
|
||||||
|
|
||||||
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
|
ARG EXTRA_PIP_INDEX_URL=https://pip.grassrootseconomics.net:8433
|
||||||
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
|
ARG EXTRA_PIP_ARGS=""
|
||||||
|
ARG PIP_INDEX_URL=https://pypi.org/simple
|
||||||
|
|
||||||
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
|
RUN pip install --index-url $PIP_INDEX_URL \
|
||||||
pip install --index-url https://pypi.org/simple \
|
--pre \
|
||||||
--extra-index-url $GITLAB_PYTHON_REGISTRY \
|
--force-reinstall \
|
||||||
--extra-index-url $EXTRA_INDEX_URL \
|
--no-cache \
|
||||||
cic-eth-aux-erc20-demurrage-token~=0.0.2a6
|
--extra-index-url $EXTRA_PIP_INDEX_URL $EXTRA_PIP_ARGS \
|
||||||
|
cic-eth-aux-erc20-demurrage-token~=0.0.2a7
|
||||||
|
|
||||||
COPY requirements.txt .
|
|
||||||
|
|
||||||
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
|
COPY *requirements.txt ./
|
||||||
pip install --index-url https://pypi.org/simple \
|
RUN pip install --index-url $PIP_INDEX_URL \
|
||||||
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
|
--pre \
|
||||||
|
--force-reinstall \
|
||||||
|
--no-cache \
|
||||||
|
--extra-index-url $EXTRA_PIP_INDEX_URL $EXTRA_PIP_ARGS \
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN python setup.py install
|
RUN python setup.py install
|
||||||
|
|
||||||
COPY cic_ussd/db/ussd_menu.json data/
|
COPY cic_ussd/db/ussd_menu.json data/
|
||||||
|
|
||||||
COPY docker/*.sh .
|
COPY docker/*.sh ./
|
||||||
RUN chmod +x /root/*.sh
|
RUN chmod +x /root/*.sh
|
||||||
|
|
||||||
# copy config and migration files to definitive file so they can be referenced in path definitions for running scripts
|
# copy config and migration files to definitive file so they can be referenced in path definitions for running scripts
|
||||||
|
@ -476,3 +476,64 @@ services:
|
|||||||
- ./apps/contract-migration/testdata/pgp/:/tmp/cic/pgp
|
- ./apps/contract-migration/testdata/pgp/:/tmp/cic/pgp
|
||||||
|
|
||||||
|
|
||||||
|
cic-user-tasker:
|
||||||
|
image: ${DEV_DOCKER_REGISTRY:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-user:${TAG:-latest}
|
||||||
|
hostname: meta
|
||||||
|
build:
|
||||||
|
context: apps/cic-ussd
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
args:
|
||||||
|
DOCKER_REGISTRY: ${DEV_DOCKER_REGISTRY:-registry.gitlab.com/grassrootseconomics}
|
||||||
|
environment:
|
||||||
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
|
DATABASE_PORT: ${DATABASE_PORT:-5432}
|
||||||
|
DATABASE_NAME: ${DATABASE_NAME:-cic_user}
|
||||||
|
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
|
||||||
|
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
||||||
|
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
|
||||||
|
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
||||||
|
DATABASE_DEBUG: ${DATABASE_DEBUG:-0}
|
||||||
|
DATABASE_POOL_SIZE: 0
|
||||||
|
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
|
||||||
|
CELERY_RESULT_URL: ${CELERY_BROKER_URL:-redis://redis}
|
||||||
|
PGP_PASSPHRASE: merman
|
||||||
|
CIC_META_URL: ${CIC_META_URL:-http://meta:8000}
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
#- cic-meta-server
|
||||||
|
- cic-eth-tasker
|
||||||
|
- cic-cache-tasker
|
||||||
|
volumes:
|
||||||
|
- ./apps/contract-migration/testdata/pgp/:/usr/src/secrets/
|
||||||
|
command: "/root/start_cic_user_tasker.sh -q cic-ussd -vv"
|
||||||
|
|
||||||
|
|
||||||
|
cic-user-tasker:
|
||||||
|
image: ${DEV_DOCKER_REGISTRY:-registry.gitlab.com/grassrootseconomics/cic-internal-integration}/cic-user:${TAG:-latest}
|
||||||
|
build:
|
||||||
|
context: apps/cic-ussd
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
args:
|
||||||
|
DOCKER_REGISTRY: ${DEV_DOCKER_REGISTRY:-registry.gitlab.com/grassrootseconomics}
|
||||||
|
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://pypi.org/simple}
|
||||||
|
EXTRA_PIP_INDEX_URL: ${EXTRA_PIP_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
|
||||||
|
EXTRA_PIP_ARGS: $EXTRA_PIP_ARGS
|
||||||
|
environment:
|
||||||
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
|
DATABASE_PORT: ${DATABASE_PORT:-5432}
|
||||||
|
DATABASE_NAME: ${DATABASE_NAME:-cic_user}
|
||||||
|
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
|
||||||
|
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
||||||
|
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
|
||||||
|
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
||||||
|
DATABASE_DEBUG: ${DATABASE_DEBUG:-0}
|
||||||
|
DATABASE_POOL_SIZE: 0
|
||||||
|
restart: on-failure
|
||||||
|
ports:
|
||||||
|
- ${DEV_CIC_USER_SERVER_PORT:-63415}:9500
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
command: "/root/start_cic_user_server.sh -vv"
|
||||||
|
Loading…
Reference in New Issue
Block a user