Skip to content

Commit c8bda11

Browse files
committed
Add DUK Integrator & the 230-form software
1 parent 762c3f0 commit c8bda11

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# file generated at some point
2+
myfile.dat
3+
14
*.pyc
25

36
bower_components/

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ rund-psql: stop-mysql stop-sqlite upd-psql ## run the project with psql in de
7474
redo-psql: drop-psql up-psql ## delete the db and rerun the project with psql
7575
redod-psql: drop-psql upd-psql ## delete the db and rerun the project with psql in detached mode
7676

77+
### Using the production environment
78+
run-prod: stop-mysql stop-sqlite stop-psql up-prod ## run the project with mysql and stop the sqlite project beforehand
79+
rund-prod: stop-mysql stop-sqlite stop-psql upd-prod ## run the project with mysql in detached mode and stop the sqlite project beforehand
80+
redo-prod: drop-prod up-prod ## delete the db and rerun the project with mysql
81+
redod-prod: drop-prod upd-prod ## delete the db and rerun the project with mysql in detached mode
82+
7783
### Other run options
7884
run: run-sqlite ## set the default run command to sqlite
7985
redo: redo-sqlite ## set the default redo command to sqlite

docker/dockerfiles/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ COPY ./backend/requirements.txt .
4141
RUN python3 -m pip install --upgrade pip setuptools && \
4242
python3 -m pip install -r ./requirements.txt
4343

44+
45+
FROM debian:bookworm-slim as dukintegrator
46+
47+
RUN apt-get update && \
48+
apt-get upgrade -y && \
49+
apt-get install -y --no-install-recommends \
50+
unzip && \
51+
apt-get clean
52+
53+
WORKDIR /var/www/dukintegrator/
54+
55+
ADD https://static.anaf.ro/static/DUKIntegrator/dist_javaInclus20200203.zip /tmp/duki/
56+
ADD https://static.anaf.ro/static/10/Anaf/Declaratii_R/AplicatiiDec/D230_10042023.zip /tmp/d230/
57+
58+
RUN unzip /tmp/duki/dist_javaInclus20200203.zip -d /var/www/dukintegrator/ && \
59+
unzip /tmp/d230/D230_10042023.zip -d /var/www/dukintegrator/dist/lib/ && \
60+
rm -rf /tmp/duki && \
61+
rm -rf /tmp/d230 && \
62+
rm -rf /var/www/dukintegrator/dist/jre6
63+
64+
4465
FROM python:3.11.7-slim-bookworm
4566

4667
ENV PYTHONUNBUFFERED=1
@@ -91,6 +112,8 @@ COPY ./backend/ /var/www/redirect/backend/
91112

92113
COPY --from=frontend /home/builduser/redirect/build/bower_components/ /var/www/redirect/backend/bower_components/
93114

115+
COPY --from=dukintegrator /var/www/dukintegrator/ /var/www/dukintegrator/
116+
94117
# activate the virtualenv:
95118
RUN . "${VIRTUAL_ENV}/bin/activate"
96119

docker/dockerfiles/Dockerfile.dev

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apt-get update && \
2121
apt-get upgrade -y && \
2222
apt-get install -y --no-install-recommends \
2323
nginx gcc xz-utils gettext python3 python3-pip python3-venv python3-dev git postgresql-client libpq-dev \
24-
openjdk-17-jre-headless && \
24+
openjdk-17-jre-headless unzip && \
2525
apt-get clean
2626

2727

@@ -57,6 +57,19 @@ RUN python3 -m pip install --upgrade pip setuptools && \
5757
RUN npm install -g npm bower && \
5858
bower install --allow-root --config.interactive=false
5959

60+
# add the DUK Integrator
61+
WORKDIR /var/www/dukintegrator/
62+
63+
ADD https://static.anaf.ro/static/DUKIntegrator/dist_javaInclus20200203.zip /tmp/duki/
64+
ADD https://static.anaf.ro/static/10/Anaf/Declaratii_R/AplicatiiDec/D230_10042023.zip /tmp/d230/
65+
66+
RUN unzip /tmp/duki/dist_javaInclus20200203.zip -d /var/www/dukintegrator/ && \
67+
unzip /tmp/d230/D230_10042023.zip -d /var/www/dukintegrator/dist/lib && \
68+
rm -rf /tmp/duki && \
69+
rm -rf /tmp/d230 && \
70+
rm -rf /var/www/dukintegrator/dist/jre6
71+
72+
6073
USER root
6174

6275

0 commit comments

Comments
 (0)