-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
41 lines (37 loc) · 977 Bytes
/
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
version: "3.8"
services:
database:
container_name: db
image: postgres:14-alpine
restart: always
user: postgres # importante definir o usuário
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- LC_ALL=C.UTF-8
- POSTGRES_PASSWORD=postgres # senha padrão
- POSTGRES_USER=postgres # usuário padrão
- POSTGRES_DB=db # necessário porque foi configurado assim no settings
ports:
- 5433:5432 # repare na porta externa 5433
networks:
- postgres
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
restart: unless-stopped
volumes:
- pgadmin:/var/lib/pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- 5050:80
networks:
- postgres
volumes:
pgdata: # mesmo nome do volume externo definido na linha 10
pgadmin:
networks:
postgres: