Spaces:
Sleeping
Sleeping
| 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 \ | |
| && pip3 install 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"] |