forked from tldr-devops/startpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
strapi.yml
74 lines (68 loc) · 1.92 KB
/
strapi.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
version: '3.8'
x-strapi-labels: &strapi-labels
labels:
- traefik.enable=true
- traefik.docker.network=strapi
- traefik.http.routers.strapi-http.rule=Host(`strapi.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.strapi-http.entrypoints=http
- traefik.http.routers.strapi-http.service=strapi
- traefik.http.routers.strapi-http.middlewares=https-redirect
- traefik.http.routers.strapi-https.rule=Host(`strapi.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.strapi-https.entrypoints=https
- traefik.http.routers.strapi-https.tls=true
- traefik.http.routers.strapi-https.service=strapi
- traefik.http.routers.strapi-https.tls.certresolver=le
- traefik.http.services.strapi.loadbalancer.server.port=1337
x-service: &service
logging:
driver: json-file
options:
max-size: "100m"
max-file: "2"
restart: always
networks:
- strapi
- database
services:
# https://docs.strapi.io/developer-docs/latest/getting-started/quick-start.html
strapi:
container_name: strapi
image: strapi/strapi
deploy:
mode: replicated
replicas: 1
resources:
reservations:
cpus: '0.01'
memory: 160M
<<: *strapi-labels
<<: *strapi-labels
<<: *service
environment:
DATABASE_CLIENT: postgres
DATABASE_NAME: strapi
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: ${STRAPI_SQL_PASSWORD?Variable STRAPI_SQL_PASSWORD not set}
volumes:
- strapi-data:/srv/app
x-volume: &volume
driver: local
x-volume-driver-opts: &volume-driver-opts
type: none
o: bind
volumes:
strapi-data:
name: strapi-data
<<: *volume
driver_opts:
<<: *volume-driver-opts
device: ${DATAPATH?Variable DATAPATH not set}/strapi/data
networks:
strapi:
name: strapi
external: true
database:
name: database
external: true