jarvisx17 commited on
Commit
8544e5e
1 Parent(s): 86af836

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official PostgreSQL image from the Docker Hub
2
+ FROM postgres:latest
3
+
4
+ # Environment variables for PostgreSQL setup
5
+ ENV POSTGRES_DB=mydatabase
6
+ ENV POSTGRES_USER=myuser
7
+ ENV POSTGRES_PASSWORD=mypassword
8
+
9
+ # Copy the custom PostgreSQL configuration file
10
+ COPY postgresql.conf /etc/postgresql/postgresql.conf
11
+
12
+ # Copy initialization scripts to the Docker container
13
+ COPY init.sql /docker-entrypoint-initdb.d/
14
+
15
+ # Expose the custom port
16
+ EXPOSE 7860
17
+
18
+ # Run PostgreSQL with the custom configuration file
19
+ CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]