File tree Expand file tree Collapse file tree 5 files changed +47
-2
lines changed Expand file tree Collapse file tree 5 files changed +47
-2
lines changed Original file line number Diff line number Diff line change
1
+ DB_PORT = 25432
2
+ DB_USERNAME = postgres
3
+ DB_PASSWORD = postgres
4
+ DB_NAME = sample
Original file line number Diff line number Diff line change
1
+ resources
Original file line number Diff line number Diff line change 1
- # READ ME
1
+ # docker-compose-postgres
2
2
3
3
learn site: < https://www.postgresqltutorial.com/postgresql-sample-database/ >
4
- # docker-compose-postgres
Original file line number Diff line number Diff line change
1
+ version : ' 3.7'
2
+ services :
3
+ postgres :
4
+ # hostname: pgsql
5
+ # container_name: pgsql
6
+ image : " postgres:alpine"
7
+ # image: postgres:11-alpine
8
+ # image: postgres:10-alpine
9
+ # image: postgres:9.6-alpine
10
+ environment :
11
+ # POSTGRES_HOST_AUTH_METHOD: "trust"
12
+ # POSTGRES_DB: ${DB_NAME:-sample}
13
+ POSTGRES_USER : ${DB_USERNAME:-postgres}
14
+ POSTGRES_PASSWORD : ${DB_PASSWORD:-postgres}
15
+ volumes :
16
+ - pgsqldata:/var/lib/postgresql/data
17
+ ports :
18
+ - " ${DB_PORT:-25432}:5432"
19
+ healthcheck :
20
+ test : ["CMD-SHELL", "pg_isready -U postgres"]
21
+ interval : 10s
22
+ timeout : 5s
23
+ retries : 5
24
+ # restart: always
25
+ restart : unless-stopped
26
+
27
+ pgadmin :
28
+ container_name : pgadmin_container
29
+ image : dpage/pgadmin4
30
+ environment :
31
+ PGADMIN_DEFAULT_EMAIL : ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
32
+ PGADMIN_DEFAULT_PASSWORD : ${PGADMIN_DEFAULT_PASSWORD:-admin}
33
+ volumes :
34
+ - pgadmin:/root/.pgadmin
35
+ ports :
36
+ - " ${PGADMIN_PORT:-5050}:80"
37
+ restart : unless-stopped
38
+
39
+ volumes :
40
+ pgsqldata :
41
+ pgadmin :
You can’t perform that action at this time.
0 commit comments