File size: 511 Bytes
e5c6e73
c7a57fd
e5c6e73
 
 
c7a57fd
1536e03
c7a57fd
eec7f37
c7a57fd
 
b9fcc2f
 
 
c7a57fd
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM postgres:16

ENV POSTGRES_USER=myuser
ENV POSTGRES_PASSWORD=mypassword
ENV POSTGRES_DB=mydatabase

EXPOSE 5432 7860

RUN sed -i '/^#port =/c\port = 5432' /usr/share/postgresql/postgresql.conf.sample

RUN apt-get update \
 && apt-get install -y python3 python3-pip python3-venv \
 && pip3 install --break-system-packages flask psycopg2-binary \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY app.py /app/app.py
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]