Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM bitnami/python:3.10.13-debian-11-r24
FROM python:3.11.13-alpine3.22

ARG container_user=openg2p
ARG container_user_group=openg2p
ARG container_user_uid=1001
ARG container_user_gid=1001

RUN groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -mN -u ${container_user_uid} -G ${container_user_group} -s /bin/bash ${container_user}
RUN apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers make
RUN apk add --no-cache bash git gettext libpq-dev postgresql16-client

RUN install_packages gettext libpq-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
RUN addgroup -g ${container_user_gid} ${container_user_group} \
&& adduser -D -u ${container_user_uid} -G ${container_user_group} -s /bin/bash ${container_user}

WORKDIR /app

Expand All @@ -19,17 +19,20 @@ ADD openg2p-spar-g2pconnect-mapper-connector-lib /app/openg2p-spar-g2pconnect-ma
ADD db_scripts /app/db_scripts
ADD main.py /app/main.py

RUN python3 -m pip install git+https://github.com/openg2p/openg2p-fastapi-common@1.1\#subdirectory=openg2p-fastapi-common # to_be_removed_on_tag
RUN python3 -m pip install git+https://github.com/openg2p/openg2p-fastapi-common@1.1\#subdirectory=openg2p-fastapi-auth # to_be_removed_on_tag
RUN python3 -m pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@1.1\#subdirectory=openg2p-g2pconnect-common-lib # to_be_removed_on_tag
RUN python3 -m pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@1.1\#subdirectory=openg2p-g2pconnect-mapper-lib # to_be_removed_on_tag
RUN python3 -m pip install \
/app/openg2p-spar-mapper-interface-lib \
/app/openg2p-spar-self-service-api \
/app/openg2p-spar-g2pconnect-mapper-connector-lib
RUN pip install git+https://github.com/openg2p/openg2p-fastapi-common@1.1\#subdirectory=openg2p-fastapi-common # to_be_removed_on_tag
RUN pip install git+https://github.com/openg2p/openg2p-fastapi-common@1.1\#subdirectory=openg2p-fastapi-auth # to_be_removed_on_tag
RUN pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@1.1\#subdirectory=openg2p-g2pconnect-common-lib # to_be_removed_on_tag
RUN pip install git+https://github.com/openg2p/openg2p-g2pconnect-common-lib@1.1\#subdirectory=openg2p-g2pconnect-mapper-lib # to_be_removed_on_tag
RUN pip install \
-e /app/openg2p-spar-mapper-interface-lib \
-e /app/openg2p-spar-self-service-api \
-e /app/openg2p-spar-g2pconnect-mapper-connector-lib

RUN apk del --no-network .build-deps

USER ${container_user}

ENV PYTHONUNBUFFERED=1
ENV SPAR_SELFSERVICE_NO_OF_WORKERS=1
ENV SPAR_SELFSERVICE_HOST=0.0.0.0
ENV SPAR_SELFSERVICE_PORT=8000
Expand Down
3 changes: 3 additions & 0 deletions db_scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

set -e
set -o pipefail

echoerr() {
echo "$@" 1>&2
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@


class LevelTypeEnum(Enum):
BANK = "bank"
BRANCH = "branch"
ACCOUNT = "account"
MOBILE_WALLET_PROVIDER = "mobile_wallet_provider"
MOBILE_NUMBER = "mobile_number"
EMAIL_WALLET_PROVIDER = "email_wallet_provider"
EMAIL_ADDRESS = "email_address"
bank = "bank"
branch = "branch"
account = "account"
mobile_wallet_provider = "mobile_wallet_provider"
mobile_number = "mobile_number"
email_wallet_provider = "email_wallet_provider"
email_address = "email_address"


class InputTypeEnum(Enum):
INPUT = "input"
SELECT = "select"
input = "input"
select = "select"


class DfspLevelSchema(BaseModel):
Expand Down