This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
96 lines (91 loc) · 2.94 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '3.9'
services:
db-pedidos:
container_name: db-pedidos
hostname: db-pedidos
image: postgres:15.6
ports:
- '8002:5432'
expose:
- 5432
healthcheck:
test: ['CMD', 'pg_isready -U ${DB_USER:-pguser} -d ${DB_NAME:-pedidos}']
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
env_file:
- .env
environment:
POSTGRES_USER: ${DB_USERNAME:-pguser}
POSTGRES_PASSWORD: ${DB_PASSWORD:-pgpwd}
POSTGRES_DB: ${DB_NAME:-pedidos}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
restart: always
networks:
- rms
api-pedidos:
container_name: api-pedidos
hostname: api-pedidos
build:
context: .
dockerfile: Dockerfile
ports:
- '3002:3002'
expose:
- 3002
env_file:
- .env
environment:
DB_HOST: db-pedidos
DB_PORT: 5432
DB_USER: ${DB_USERNAME:-pguser}
DB_PASSWORD: ${DB_PASSWORD:-pgpwd}
DB_NAME: ${DB_NAME:-rms}
DB_SSL: ${DB_SSL:-false}
COGNITO_USER_POOL_ID: ${COGNITO_USER_POOL_ID:-}
COGNITO_CLIENT_ID: ${COGNITO_CLIENT_ID:-}
LOCALSTACK_ENDPOINT: http://localstack:4566
NOME_FILA_NOVA_COBRANCA: ${NOME_FILA_NOVA_COBRANCA:-nova-cobranca}
URL_FILA_NOVA_COBRANCA: http://localstack:4566/000000000000/nova-cobranca
REGION_FILA_NOVA_COBRANCA: ${REGION_FILA_NOVA_COBRANCA:-us-east-1}
NOME_FILA_COBRANCA_GERADA: ${NOME_FILA_COBRANCA_GERADA:-cobranca-gerada}
URL_FILA_COBRANCA_GERADA: http://localstack:4566/000000000000/cobranca-gerada
REGION_FILA_COBRANCA_GERADA: ${REGION_FILA_COBRANCA_GERADA:-us-east-1}
NOME_FILA_FALHA_COBRANCA: ${NOME_FILA_FALHA_COBRANCA:-falha-cobranca}
URL_FILA_FALHA_COBRANCA: http://localstack:4566/000000000000/falha-cobranca
REGION_FILA_FALHA_COBRANCA: ${REGION_FILA_FALHA_COBRANCA:-us-east-1}
NOME_FILA_PAGAMENTO_CONFIRMADO: pagamento-confirmado
URL_FILA_PAGAMENTO_CONFIRMADO: http://localstack:4566/000000000000/pagamento-confirmado
REGION_FILA_PAGAMENTO_CONFIRMADO: ${REGION_FILA_PAGAMENTO_CONFIRMADO:-us-east-1}
restart: always
networks:
- rms
depends_on:
- db-pedidos
- localstack
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
image: localstack/localstack:3.5.0
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
- SERVICES=sqs
volumes:
- "./init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh" # ready hook
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: always
networks:
- rms
networks:
rms:
name: rms_network
driver: bridge
volumes:
postgres: