-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (64 loc) · 1.83 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '3'
networks:
ecidade:
driver: bridge
services:
web:
build:
context: ./docker
dockerfile: Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
DB_SERVIDOR: bd
DB_PORTA: '${DB_PORTA:-5432}'
volumes:
- './:/var/www/html'
networks:
- ecidade
ports:
- '${APP_PORT:-8282}:80'
depends_on:
bd:
condition: service_healthy
bd:
image: ecidadecontass:bd
restart: always
ports:
- "${DB_PORTA:-5432}:5432"
build:
context: ./docker/bd
x-bake:
no-cache: true
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# POSTGRES_DB: ${DB_BASE}
POSTGRES_INITDB_ARGS: '--encoding=LATIN1 --lc-collate=pt_BR.ISO-8859-1 --lc-ctype=pt_BR.ISO-8859-1 --lc-messages=pt_BR.ISO-8859-1 --lc-monetary=pt_BR.ISO-8859-1 --lc-numeric=pt_BR.ISO-8859-1 --lc-time=pt_BR.ISO-8859-1'
volumes:
- ./docker/scripts/iniciarbd.sql:/docker-entrypoint-initdb.d/iniciarbd.sql
- './docker/bd/pgsql:/var/lib/postgresql/data'
networks:
- ecidade
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ecidade" ]
interval: 10s
timeout: 5s
retries: 5
adminer:
image: adminer:latest
restart: always
environment:
ADMINER_DEFAULT_SERVER: bd
ADMINER_DEFAULT_USER: ecidade
ADMINER_DEFAULT_PASSWORD: ecidade
ADMINER_DEFAULT_TYPE: postgresql
ADMINER_DEFAULT_PORT: "${DB_PORTA:-5432}:5432"
ADMINER_DEFAULT_DB: ecidade
networks:
- ecidade
ports:
- "${ADMINER_PORT:-8484}:8080"
depends_on:
bd:
condition: service_healthy