Spaces:
Sleeping
Sleeping
Download Dockerfile from GamerC0der/postgres: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/spaces/GamerC0der/postgres/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/GamerC0der/postgres/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/GamerC0der/postgres/resolve/main/Dockerfile
511 Bytes
| 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"] |