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
83 lines (79 loc) · 2.1 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
services:
db:
container_name: db
hostname: db
image: postgres:15.6
ports:
- '5432:5432'
expose:
- 5432
healthcheck:
test: ['CMD', 'pg_isready -U ${DB_USERNAME:-pguser} -d ${DB_NAME:-health_med}']
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:-health_med}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
- ./scripts:/docker-entrypoint-initdb.d
restart: always
networks:
- default
api:
container_name: api
hostname: api
build:
context: .
dockerfile: Dockerfile
ports:
- '3000:3000'
expose:
- 3000
env_file:
- .env
environment:
DB_HOST: db
DB_PORT: 5432
DB_USER: ${DB_USERNAME:-pguser}
DB_PASSWORD: ${DB_PASSWORD:-pgpwd}
DB_NAME: ${DB_NAME:-health_med}
DB_SSL=: ${DB_SSL:-false}
COGNITO_USER_POOL_ID: ${COGNITO_USER_POOL_ID:-}
COGNITO_CLIENT_ID: ${COGNITO_CLIENT_ID:-}
S3_BUCKET_ENDPOINT: http://s3.localhost.localstack.cloud:4566
BUCKET_NAME_PRONTUARIOS: ${BUCKET_NAME_PRONTUARIOS:-prontuarios-pacientes}
restart: always
networks:
- default
depends_on:
- db
- 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=s3
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:
- default
networks:
default:
driver: bridge
volumes:
postgres: