-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
85 lines (82 loc) · 2.04 KB
/
docker-compose.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.8'
services:
etl_mobilidade: &mobilidade-common
image: etl_mobilidade:1.0
container_name: main_etl_mobilidade
restart: always
env_file:
- .env
volumes:
- .:/opt/app
networks:
docker_network:
minio:
image: minio/minio:latest
container_name: minio-mobilidade
ports:
- "9003:9000"
- "9004:9001"
volumes:
- data-minio-mobilidade:/data
env_file:
- .env
command: server /data --console-address :9001
networks:
docker_network:
createbucket:
image: minio/mc:latest
container_name: minio-create-bucket-mobilidade
depends_on:
- minio
env_file:
- .env
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add --api s3v4 s3 http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD;
/usr/bin/mc mb s3/$MINIO_BUCKET/;
/usr/bin/mc anonymous set download s3/$MINIO_BUCKET;
"
networks:
docker_network:
db-mobilidade:
image: bitnami/postgresql:14.2.0-debian-10-r4
container_name: db-mobilidade
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 5s
retries: 20
networks:
docker_network:
ipv4_address: 172.19.0.20
volumes:
- mobilidade-postgres-db-volume:/var/lib/postgresql/data
db-migrate-mobilidade:
<<: *mobilidade-common
container_name: db-migrate-mobilidade
restart: "no"
depends_on:
db-mobilidade:
condition: service_healthy
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
stdin_open: true # docker run -i
tty: true # docker run -t
entrypoint: bash
command: -c "alembic upgrade head"
networks:
docker_network:
driver: bridge
ipam:
config:
- subnet: 172.19.0.0/16
volumes:
data-minio-mobilidade:
mobilidade-postgres-db-volume: