-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
40 lines (39 loc) · 2.36 KB
/
docker-compose.example.yml
File metadata and controls
40 lines (39 loc) · 2.36 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
# UPDATE :
# - This file has nothing to do with this Strapi app and dockerizing it.
# - This is just a docker-compose file with some notes. Please use the docker-compose.yml to handle docker-compose things.
version: '3'
services:
strapi:
build: .
container_name: YOUR_CONTAINER_NAME
environment:
NODE_ENV: YOUR_APP_ENVIRONMENT #(e.g. : production, staging, development, etc.)
# == MongoDB Atlas configuration ==
DATABASE_CLIENT: mongo
DATABASE_HOST: DB_HOST #(e.g. : cluster3.abc65.mongodb.net if you are using MongoDB Atlas)
# -- NOTE --
# If you have a MongoDB connection string like 'mongodb://srv...', it means DATABASE_SRV is 'true'.
DATABASE_SRV: DB_SRV #('true' or 'false', please note that it MUST be string or null)
DATABASE_PORT: DB_PORT #(e.g. : 27017)
DATABASE_NAME: DB_NAME #(e.g. : myStrapiApp)
DATABASE_USERNAME: DB_USERNAME #(e.g. : admin)
DATABASE_PASSWORD: DB_PASSWD
# -- NOTE --
# When using MongoDB Atlas, DATABASE_SSL must be set to 'true'. Otherwise (local MongoDB) set it to 'false'.
DATABASE_SSL: 'true' #('true' or 'false', please note that it MUST be string or null)
# AUTHENTICATION_DATABASE: admin
# == CORS ==
CORS_ORIGIN: ALLOWED_CORS_ORIGIN #(e.g. : http://192.168.1.5:8000,http://192.168.1.5:3000,http://192.168.1.16:1337,https://my-strapi-website.com,https://my-another-website.net)
# == JWT SECRET for your Strapi app ==
ADMIN_JWT_SECRET: YOUR_ADMIN_JWT_SECRET #(e.g. : ErhxCk10YqNCImwodl5Ml/Maqnw46oTyLjr+9Na4bjmJSLVWnCS90BJRAAkLsspj98caylAJgikBO9ZS0jEiOQ==)
# ADMIN_JWT_SECRET (Admin JWT Secret) is different from Admin's (Superadmin's) JWT. Please have a look at https://github.com/kevinadhiguna/js-create-jwt.
# == AWS configuration ==
AWS_REGION: AWS_REGION #(e.g.: eu-west-3)
AWS_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID #(e.g.: DGHY4REH7IUVDF908UNV)
AWS_SECRET_ACCESS_KEY: AWS_SECRET_ACCESS_KEY #(e.g.: 3bFhYF76zFG+5F78436KJ8bH3x19TALuIxytfNc/)
AWS_BUCKET: AWS_BUCKET #(e.g.: mybucket.mydomain.com)
ports:
- 'HOST_PORT:CONTAINER_PORT' #(Specify host port and container port, format => host port:container port. e.g. : '1337:1337')
# -- NOTE --
# 'HOST_PORT' is the port that will be exposable to the public.
# 'CONTAINER_PORT' is the internal port in which the app will be running on.