-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.prod.yml
134 lines (124 loc) · 5.83 KB
/
docker-compose.prod.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
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
services:
traefik:
image: "traefik:v3.2"
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=aristide.mbassi28@gmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`traefik.place.cm`)"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.entrypoints=websecure"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.tls.certresolver=myresolver"
- "traefik.http.middlewares.test-auth.basicauth.users=${TRAEFICK_USER}:${TRAEFICK_PASSWORD}"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- letsencrypt:/letsencrypt
website:
image: ghcr.io/amacado/docker-landingpage-coming-soon:main
restart: always
container_name: website
labels:
- "traefik.enable=true"
- "traefik.http.routers.website.rule=Host(`place.cm`)"
- "traefik.http.services.website.loadbalancer.server.port=80"
- "traefik.http.routers.website.tls=true"
- "traefik.http.routers.website.tls.certresolver=myresolver"
- "traefik.http.routers.website-www.rule=Host(`www.place.cm`)"
- "traefik.http.routers.website-www.tls=true"
- "traefik.http.routers.website-www.tls.certresolver=myresolver"
- "traefik.http.routers.website-www.entrypoints=websecure"
- "traefik.http.services.website.loadbalancer.server.port=80"
environment:
- TITLE=Place is launching soon..
- META_TITLE=Place - Cameroon | Launching soon!
- SUBTITLE=We are working hard to finish the development of this site.
- FOOTER=<a href='mailto:[email protected]'>[email protected]</a> | <a href='https://www.place.cm'>www.place.cm</a> | <a href='tel:0123456789'>+00 0123 456789</a>
- OVERLAY_COLOR=rgba(0, 0, 0, 0.8)
- BACKGROUND_COLOR=#455A64
place-api:
image: genjirusuchiwa/place:api-latest
user: dotnetuser
container_name: "place-api"
labels:
- "traefik.enable=true"
- "traefik.http.routers.place-api.rule=Host(`api.place.cm`)"
- "traefik.http.routers.place-api.entrypoints=websecure"
- "traefik.http.routers.place-api.tls=true"
- "traefik.http.routers.place-api.tls.certresolver=myresolver"
environment:
- Logging__LogLevel__Default=${LOGGING_LEVEL_DEFAULT:-Information}
- Logging__LogLevel__Microsoft.AspNetCore=${LOGGING_LEVEL_MICROSOFT:-Warning}
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
- ASPNETCORE_URLS=http://+:${API_PORT:-5000}
- app__name=${APP_NAME}
- ConnectionStrings__Account=Server=postgres;Port=5432;Database=${PROFILE_DB_NAME};User Id=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};Include Error Detail=true
- ConnectionStrings__Identity=Server=postgres;Port=5432;Database=${IDENTITY_DB_NAME};User Id=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};Include Error Detail=true
- Serilog__applicationName=${SERILOG_APP_NAME}
- Serilog__level=${SERILOG_LEVEL:-information}
- Serilog__console__enabled=true
- apiVersioning__enabled=${API_VERSIONING_ENABLED:-true}
- apiVersioning__defaultVersion=${API_VERSIONING_DEFAULT:-1.0}
- apiVersioning__assumeDefaultVersionWhenUnspecified=${API_VERSIONING_ASSUME_DEFAULT:-true}
- apiVersioning__reportApiVersions=${API_VERSIONING_REPORT:-true}
- apiVersioning__addVersionParamToNeutralEndpoints=${API_VERSIONING_ADD_PARAM:-false}
- apiVersioning__versionReaderType=${API_VERSIONING_READER:-UrlSegment}
- apiVersioning__headerName=${API_VERSIONING_HEADER:-X-Api-Version}
- apiVersioning__queryStringParam=${API_VERSIONING_QUERY_PARAM:-api-version}
- apiVersioning__mediaTypeParam=${API_VERSIONING_MEDIA_PARAM:-v}
- swagger__enabled=${SWAGGER_ENABLED:-true}
- swagger__title=${SWAGGER_TITLE}
- swagger__versions__0=${SWAGGER_VERSION_1:-1.0}
- swagger__versions__1=${SWAGGER_VERSION_2:-2.0}
- swagger__useAuthentication=${SWAGGER_USE_AUTH:-true}
- swagger__enableDownload=${SWAGGER_ENABLE_DOWNLOAD:-true}
- swagger__useSwaggerUI=${SWAGGER_USE_UI:-true}
- swagger__useReDoc=${SWAGGER_USE_REDOC:-true}
- swagger__swaggerUIRoute=${SWAGGER_UI_ROUTE:-swagger}
- swagger__reDocRoute=${SWAGGER_REDOC_ROUTE:-api-docs}
- swagger__uiOptions__docExpansion=${SWAGGER_DOC_EXPANSION:-List}
- swagger__uiOptions__defaultModelsExpandDepth=${SWAGGER_MODELS_DEPTH:-1}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:5000/health || exit 1
interval: 10s
timeout: 5s
retries: 5
start_period: 40s
restart: always
postgres:
image: postgres:15-alpine
ports:
- "${POSTGRES_PORT:-5490}:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init-multiple-databases.sh:/docker-entrypoint-initdb.d/init-multiple-databases.sh
healthcheck:
test: pg_isready -U ${POSTGRES_USER}
interval: 10s
timeout: 5s
retries: 5
restart: always
volumes:
postgres-data:
name: ${POSTGRES_VOLUME_NAME:-postgres-data}
letsencrypt: