Dockerfile added
This commit is contained in:
parent
ec6fc95b91
commit
4f648f1666
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM alpine:3.21
|
||||
|
||||
ENV PGHOST="database.database1.svc.cluster.local"
|
||||
ENV PGDATABASE="udi-hottis"
|
||||
ENV PGUSER="pv-energy-calculator"
|
||||
ENV PGPASSWORD="-"
|
||||
ENV PGSSLMODE="require"
|
||||
|
||||
ARG USER="user"
|
||||
|
||||
RUN \
|
||||
apk add --no-cache postgresql16-client && \
|
||||
addgroup $USER && \
|
||||
adduser -G $USER -D $USER
|
||||
|
||||
USER $USER
|
||||
WORKDIR /home/$USER
|
||||
|
||||
COPY ./queries/pvec.sql .
|
||||
|
||||
CMD [ "psql", "-f", "pvec.sql" ]
|
||||
|
@ -51,4 +51,3 @@ INSERT INTO pv_energy_by_month
|
||||
update_counter = pv_energy_by_month.update_counter + 1,
|
||||
current_energy = (SELECT e FROM last_pv_energy_of_yesterday) - pv_energy_by_month.baseline_energy;
|
||||
|
||||
COMMIT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user