-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
62 lines (60 loc) · 1.85 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
services:
db:
image: postgres:16
container_name: db
ports:
- "5432"
volumes:
- ./mnt/pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: api_pgd
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d api_pgd"]
interval: 5s
timeout: 5s
retries: 5
api-pgd:
image: ghcr.io/gestaogovbr/api-pgd:latest
container_name: api-pgd
depends_on:
db:
condition: service_healthy
ports:
- "5057:5057"
volumes:
- ./:/api-pgd
environment:
# set a version number manually
# TAG_NAME: 3.x.x
ALGORITHM: HS256
API_PGD_ADMIN_USER: johndoe@oi.com
API_PGD_ADMIN_PASSWORD: secret
# SQLALCHEMY_DATABASE_URL based on values set at services.db.environment
# as postgresql+psycopg://<POSTGRES_USER>:<POSTGRES_PASSWORD>@db:5432/<POSTGRES_DB>
SQLALCHEMY_DATABASE_URL: postgresql+psycopg://postgres:postgres@db:5432/api_pgd
# to new `SECRET` run openssl rand -hex 32
SECRET: b8a3054ba3457614e95a88cc0807384430c1b338a54e95e4245f41e060da68bc
ACCESS_TOKEN_EXPIRE_MINUTES: 30
TEST_ENVIRONMENT: 'False'
MAIL_USERNAME: ''
MAIL_FROM: admin@api-pgd.gov.br
MAIL_PORT: 25
MAIL_SERVER: smtp4dev
MAIL_FROM_NAME: admin@api-pgd.gov.br
MAIL_PASSWORD: ''
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:5057/docs"]
interval: 5s
timeout: 5s
retries: 20
smtp4dev:
image: rnwood/smtp4dev:v3
restart: always
ports:
- '5000:80'
- '25:25' # Change the number before : to the port the SMTP server should be accessible on
- '143:143' # Change the number before : to the port the IMAP server should be accessible on
environment:
- ServerOptions__HostName=smtp4dev