-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (52 loc) · 1.22 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
services:
strapi:
container_name: strapi
build:
context: .
dockerfile: Dockerfile
image: mystrapi:latest
restart: unless-stopped
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_NAME: strapi
POSTGRES_USERNAME: strapi
POSTGRES_PASSWORD: strapi
APP_KEYS: testKey1,testKey2
API_TOKEN_SALT: someRandomLongString
JWT_SECRET: jwt-secret
ADMIN_JWT_SECRET: admin-jwt-secret
CORS_ORIGIN: http://localhost:1337,https://data.norge.no
volumes:
- ./config:/opt/app/config
- ./src:/opt/app/src
- ./package.json:/opt/package.json
- ./yarn.lock:/opt/yarn.lock # Replace with package-lock.json if using npm
ports:
- "1337:1337"
networks:
strapi:
aliases:
- strapi
depends_on:
- db
db:
image: postgres:14-alpine
restart: unless-stopped
environment:
POSTGRES_USER: strapi
POSTGRES_PASSWORD: strapi
POSTGRES_DB: strapi
volumes:
- strapi-data:/var/lib/postgresql/data/ #using a volume
ports:
- "5432:5432"
networks:
strapi:
aliases:
- db
volumes:
strapi-data:
networks:
strapi:
name: strapi