Skip to content

Commit

Permalink
Add DUK Integrator & the 230-form software
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Feb 7, 2024
1 parent 9f18b8b commit 2d2df13
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# file generated at some point
myfile.dat

*.pyc

bower_components/
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ rund-psql: stop-mysql stop-sqlite upd-psql ## run the project with psql in de
redo-psql: drop-psql up-psql ## delete the db and rerun the project with psql
redod-psql: drop-psql upd-psql ## delete the db and rerun the project with psql in detached mode

### Using the production environment
run-prod: stop-mysql stop-sqlite stop-psql up-prod ## run the project with mysql and stop the sqlite project beforehand
rund-prod: stop-mysql stop-sqlite stop-psql upd-prod ## run the project with mysql in detached mode and stop the sqlite project beforehand
redo-prod: drop-prod up-prod ## delete the db and rerun the project with mysql
redod-prod: drop-prod upd-prod ## delete the db and rerun the project with mysql in detached mode

### Other run options
run: run-sqlite ## set the default run command to sqlite
redo: redo-sqlite ## set the default redo command to sqlite
Expand Down
23 changes: 23 additions & 0 deletions docker/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ COPY ./backend/requirements.txt .
RUN python3 -m pip install --upgrade pip setuptools && \
python3 -m pip install -r ./requirements.txt


FROM debian:bookworm-slim as dukintegrator

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
unzip && \
apt-get clean

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


FROM python:3.11.7-slim-bookworm

ENV PYTHONUNBUFFERED=1
Expand Down Expand Up @@ -91,6 +112,8 @@ COPY ./backend/ /var/www/redirect/backend/

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

COPY --from=dukintegrator /var/www/dukintegrator/ /var/www/dukintegrator/

# activate the virtualenv:
RUN . "${VIRTUAL_ENV}/bin/activate"

Expand Down
15 changes: 14 additions & 1 deletion docker/dockerfiles/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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 && \
openjdk-17-jre-headless unzip && \
apt-get clean


Expand Down Expand Up @@ -57,6 +57,19 @@ RUN python3 -m pip install --upgrade pip setuptools && \
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


USER root


Expand Down

0 comments on commit 2d2df13

Please sign in to comment.