forked from OpenG2P/g2p-cash-transfer-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
payment-backend.Dockerfile
33 lines (24 loc) · 1.25 KB
/
payment-backend.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM bitnami/python:3.10.13-debian-11-r24
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} \
&& mkdir -p /app/payment_backend
WORKDIR /app
RUN install_packages libpq-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
RUN chown -R ${container_user}:${container_user_group} /app
USER ${container_user}
ADD --chown=${container_user}:${container_user_group} . /app/src
RUN python3 -m venv venv \
&& . ./venv/bin/activate
RUN python3 -m pip install \
git+https://github.com/openg2p/openg2p-fastapi-common.git@develop\#egg=openg2p-fastapi-common\&subdirectory=openg2p-fastapi-common \
git+https://github.com/openg2p/openg2p-fastapi-common.git@develop\#egg=openg2p-fastapi-auth\&subdirectory=openg2p-fastapi-auth \
git+https://github.com/openg2p/openg2p-fastapi-common.git@develop\#egg=openg2p-common-g2pconnect-id-mapper\&subdirectory=openg2p-common-g2pconnect-id-mapper \
./src/g2p-cash-transfer-bridge-core \
./src/gctb-translate-id-fa
WORKDIR /app/payment_backend
CMD python3 payment_backend.py run