-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
45 lines (41 loc) · 1.46 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use postgres/example user/password credentials
version: '3.5'
services:
# Create a service named db.
tf-postgres-db:
# Use the Docker Image postgres. This will pull the newest release.
image: "postgres"
# Give the container the name my_postgres. You can changes to something else.
container_name: "tf_postgres_db"
# Setup the username, password, and database name. You can changes these values.
environment:
- POSTGRES_USER=vder
- POSTGRES_PASSWORD=password
- POSTGRES_MULTIPLE_DATABASES=task,task_test
# Maps port 54320 (localhost) to port 5432 on the container. You can change the ports to fix your needs.
volumes:
- ./src/main/resources/db:/docker-entrypoint-initdb.d
networks:
- postgres-db
restart: always
ports:
- "54340:5432"
# Set a volume some that database is not lost after shutting down the container.
# I used the name postgres-data but you can changed it to something else.
# - ./postgres-data:/var/lib/postgresql/data/pgdata
pgadmin2:
container_name: exchange_pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL:[email protected]}"
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD:-admin}"
# volumes:
# - pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-5060}:80"
networks:
- postgres-db
restart: unless-stopped
networks:
postgres-db:
driver: bridge