-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (88 loc) · 3.03 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
84
85
86
87
88
89
90
91
92
93
94
version: "3"
services:
client:
container_name: client
image: hicsail/restore-client:main
restart: unless-stopped
environment:
# Note: To prevent accidentally leaking env variables to the client, Vite
# only exposes variables prefixed with VITE_ to the code.
VITE_STRAPI_URL: ${VITE_STRAPI_URL}
# This is a Strapi API token that you create on the Strapi Admin panel.
# It should grant access only to content meant to be publicly viewable.
# It is NOT a secret - site visitors can see it in their browsers.
# Therefore, make sure the token is type 'Custom', and manually check
# 'find' and 'findOne' on each Content-Type you want to expose.
# It is not appropriate to create a token of type 'Read-only' instead of
# 'Custom' - this can be used to query Strapi on (for example) user data.
VITE_CONTENT_TOKEN: ${VITE_CONTENT_TOKEN}
ports:
- "5173:5173"
strapi:
container_name: strapi
image: hicsail/restore-strapi:main
restart: unless-stopped
environment:
DATABASE_CLIENT: postgres
DATABASE_HOST: strapiDB
DATABASE_PORT: 5432
DATABASE_NAME: strapi
DATABASE_USERNAME: strapi
# DATABASE_SSL does not behave the way you expect it to. Ask this committer.
# In any case: set to false since we are using the docker network.
DATABASE_SSL: "false"
# Set these in Portainer, or in a .env for local development; see .env.example.
# NB: If they are set in Portainer they don't actually have to be listed here, but let's list them bc documentation.
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
API_TOKEN_SALT: ${API_TOKEN_SALT}
APP_KEYS: ${APP_KEYS}
NODE_ENV: ${NODE_ENV}
volumes:
- strapi-models:/opt/app/src
- strapi-uploads:/opt/app/public/uploads
ports:
- "1337:1337"
networks:
- strapi
depends_on:
- strapiDB
strapiDB:
container_name: strapiDB
platform: linux/amd64 #for platform error on Apple M1 chips
restart: unless-stopped
image: postgres:14.0-alpine
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- strapi-data:/var/lib/postgresql/data/
ports:
- "5432:5432"
networks:
- strapi
backup:
container_name: backup
image: offen/docker-volume-backup:v2.33.0
restart: unless-stopped
env_file:
- ./backup.env # Backup container needs what's in here...
# ...plus the relevant subset of what's in Portainer
environment:
AWS_S3_PATH: ${AWS_S3_PATH}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
volumes:
- strapi-models:/backup/strapi-models:ro
- strapi-uploads:/backup/strapi-uploads:ro
- strapi-data:/backup/strapi-data:ro
volumes:
strapi-models:
strapi-uploads:
strapi-data:
networks:
strapi:
name: Strapi
driver: bridge