-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDockerfile.dev
More file actions
93 lines (62 loc) · 2.51 KB
/
Copy pathDockerfile.dev
File metadata and controls
93 lines (62 loc) · 2.51 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FROM node:18.17.1-bookworm-slim
ENV PYTHONUNBUFFERED=1
ENV DEBUG=True
ENV ENVIRONMENT=development
ENV RUN_MIGRATIONS=True
ENV RUN_COMPILE_MESSAGES=True
ENV RUN_COLLECT_STATIC=False
ENV RUN_CREATE_SUPER_USER=True
ENV RUN_CREATE_ADMIN=True
ENV RUN_SEED_GROUPS=True
ENV IS_CONTAINERIZED=True
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
nginx gcc xz-utils gettext python3 python3-pip python3-venv python3-dev git postgresql-client libpq-dev \
openjdk-17-jre-headless unzip && \
apt-get clean
ARG S6_OVERLAY_VERSION=3.1.2.1
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME 0
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && \
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
COPY docker/nginx/nginx.conf /etc/nginx/sites-available/default
COPY docker/s6-rc.d /etc/s6-overlay/s6-rc.d
# Python virtualenv paths
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# copy the backend source code:
COPY ./backend/ /var/www/redirect/backend/
WORKDIR /var/www/redirect/backend/
RUN rm -rf ./_appengine_legacy
# install the backend libraries:
RUN python3 -m pip install --upgrade pip setuptools && \
python3 -m pip install -r ./requirements-dev.txt
# install the frontend libraries:
RUN npm install -g npm bower && \
bower install --allow-root --config.interactive=false
# add the DUK Integrator
WORKDIR /var/www/dukintegrator/
ADD https://static.anaf.ro/static/DUKIntegrator/dist_javaInclus20200203.zip /tmp/duki/
ADD https://static.anaf.ro/static/10/Anaf/Declaratii_R/AplicatiiDec/D230_10042023.zip /tmp/d230/
RUN unzip /tmp/duki/dist_javaInclus20200203.zip -d /var/www/dukintegrator/ && \
unzip /tmp/d230/D230_10042023.zip -d /var/www/dukintegrator/dist/lib && \
rm -rf /tmp/duki && \
rm -rf /tmp/d230 && \
rm -rf /var/www/dukintegrator/dist/jre6 \
COPY ./docker/xml/ /var/www/dukintegrator/dist/xml/
USER root
# Make sure scripts in .local are usable:
ENV PATH=/root/.local/bin:$PATH
ARG VERSION
ARG REVISION
ENV VERSION=${VERSION}
ENV REVISION=${REVISION}
RUN touch /var/www/redirect/.version && \
echo "$VERSION+$(echo ${REVISION} | cut -c 1-7)" > /var/www/redirect/.version
WORKDIR /var/www/redirect/
ENTRYPOINT ["/init"]
EXPOSE 8000