-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
145 lines (139 loc) · 6.29 KB
/
Copy pathdocker-compose.yml
File metadata and controls
145 lines (139 loc) · 6.29 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
services:
postgres:
image: postgres:16-alpine
container_name: tm-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-taskmanagement}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- taskmanagement-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-taskmanagement}"]
interval: 10s
retries: 10
start_period: 10s
timeout: 3s
auth-service:
image: ${AUTH_IMAGE:-diogopro/taskmanagement-auth:latest}
pull_policy: always
container_name: tm-auth
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Development}
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__TaskManagementDbConnection: Host=postgres;Port=5432;Database=${POSTGRES_DB:-taskmanagement};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres};
OpenIddict__Issuer: ${AUTH_ISSUER:-https://auth.localhost}
OpenIddict__Audience: ${OPENIDDICT_AUDIENCE:-task_management_api_dev}
OpenIddict__EncryptionKey: ${OPENIDDICT_ENCRYPTION_KEY:-DRjd/GnduI3Efzen9V9BvbNUfc/VKgXltV7Kbk9sMkY=}
DemoData__Enabled: ${DEMO_DATA_ENABLED:-true}
DemoData__DefaultPassword: ${DEMO_PASSWORD:-Demo123!}
ClientSettings__Clients__0__ClientId: swagger-client
ClientSettings__Clients__0__ClientType: ${SWAGGER_CLIENT_TYPE:-confidential}
ClientSettings__Clients__0__ClientSecret: ${SWAGGER_CLIENT_SECRET:-901564A5-E7FE-42CB-B10D-61EF6A8F3654}
ClientSettings__Clients__0__DisplayName: Swagger Client application
ClientSettings__Clients__0__RedirectUris__0: ${API_BASE_URL:-https://api.localhost}/swagger/oauth2-redirect.html
ClientSettings__Clients__0__PostLogoutRedirectUris__0: ${API_BASE_URL:-https://api.localhost}/callback/logout/local
ClientSettings__Clients__0__AllowedCorsOrigins__0: ${API_BASE_URL:-https://api.localhost}
ClientSettings__Clients__0__AllowedScopes__0: api1
ClientSettings__Clients__1__ClientId: angular-client
ClientSettings__Clients__1__ClientType: public
ClientSettings__Clients__1__DisplayName: Angular Client application
ClientSettings__Clients__1__RedirectUris__0: ${APP_BASE_URL:-https://app.localhost}/callback
ClientSettings__Clients__1__PostLogoutRedirectUris__0: ${APP_BASE_URL:-https://app.localhost}
ClientSettings__Clients__1__AllowedCorsOrigins__0: ${APP_BASE_URL:-https://app.localhost}
ClientSettings__Clients__1__AllowedScopes__0: api1
networks:
- taskmanagement-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 8
start_period: 40s
api-service:
image: ${API_IMAGE:-diogopro/taskmanagement-api:latest}
pull_policy: always
container_name: tm-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
auth-service:
condition: service_healthy
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Development}
ASPNETCORE_URLS: http://+:8080
ConnectionStrings__TaskManagementDbConnection: Host=postgres;Port=5432;Database=${POSTGRES_DB:-taskmanagement};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres};
OpenIddict__Issuer: ${AUTH_ISSUER:-https://auth.localhost}
OpenIddict__Audience: ${OPENIDDICT_AUDIENCE:-task_management_api_dev}
OpenIddict__EncryptionKey: ${OPENIDDICT_ENCRYPTION_KEY:-DRjd/GnduI3Efzen9V9BvbNUfc/VKgXltV7Kbk9sMkY=}
DemoData__Enabled: ${DEMO_DATA_ENABLED:-true}
AuthApi__BaseUrl: ${AUTH_INTERNAL_BASE_URL:-http://auth-service:8080/}
ClientSettings__AuthorizationUrl: ${AUTH_ISSUER:-https://auth.localhost}/connect/authorize
ClientSettings__TokenUrl: ${AUTH_ISSUER:-https://auth.localhost}/connect/token
ClientSettings__Clients__0__ClientId: swagger-client
ClientSettings__Clients__0__ClientSecret: ${SWAGGER_CLIENT_SECRET:-901564A5-E7FE-42CB-B10D-61EF6A8F3654}
ClientSettings__Clients__0__RequirePkce: true
ClientSettings__Clients__0__Description: OAuth2 Authorization Code Flow with PKCE
ClientSettings__Clients__0__Scopes__profile: Access your profile information
ClientSettings__Clients__0__Scopes__email: Access your email address
ClientSettings__Clients__0__Scopes__roles: Access your role information
ClientSettings__Clients__0__AllowedCorsOrigins__0: ${API_BASE_URL:-https://api.localhost}
ClientSettings__Clients__1__ClientId: angular-client
ClientSettings__Clients__1__Description: Angular SPA client
ClientSettings__Clients__1__RequirePkce: true
ClientSettings__Clients__1__Scopes__profile: Access your profile information
ClientSettings__Clients__1__Scopes__email: Access your email address
ClientSettings__Clients__1__Scopes__roles: Access your role information
ClientSettings__Clients__1__AllowedCorsOrigins__0: ${APP_BASE_URL:-https://app.localhost}
networks:
- taskmanagement-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 8
start_period: 40s
client:
image: ${CLIENT_IMAGE:-diogopro/taskmanagement-client:localhost}
pull_policy: always
container_name: tm-client
restart: unless-stopped
environment:
APP_BASE_URL: ${APP_BASE_URL:-https://app.localhost}
API_BASE_URL: ${API_BASE_URL:-https://api.localhost}
AUTH_ISSUER: ${AUTH_ISSUER:-https://auth.localhost}
networks:
- taskmanagement-network
caddy:
image: caddy:2-alpine
container_name: tm-caddy
restart: unless-stopped
environment:
APP_HOST: ${APP_HOST:-}
API_HOST: ${API_HOST:-}
AUTH_HOST: ${AUTH_HOST:-}
depends_on:
- client
- api-service
- auth-service
volumes:
- ${CADDYFILE_PATH:-./Caddyfile.local}:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
networks:
- taskmanagement-network
networks:
taskmanagement-network:
driver: bridge
volumes:
postgres-data:
caddy_data:
caddy_config: