-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (49 loc) · 1.27 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
# Docker compose files used for dev environments
version: "3.8"
services:
next:
container_name: next
image: node:12-alpine
working_dir: /app
environment:
- NEXT_PUBLIC_STRAPI_PUBLIC_URL=http://localhost:1337
- NEXT_PUBLIC_STRAPI_CLUSTER_URL=http://strapi:1337
ports:
- "3000:3000"
volumes:
- .:/app
# Live reload for modules
- /app/node_modules
# Live reload for next
- /app/.next
command: sh -c "npm install && npm run dev"
depends_on:
- strapi
strapi:
build: ./api
container_name: strapi
image: strapi/base
working_dir: /srv/app
ports:
- "1337:1337"
volumes:
- ./api:/srv/app
environment:
- DATABASE_CLIENT=postgres
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_NAME=strapi
- DATABASE_USERNAME=strapi
- DATABASE_PASSWORD=strapi
- ADMIN_JWT_SECRET=DH5eUr4yC8YGnPpN5/oGJex2dAxVJ9ykmSo3+KMXQkkAJhLGvnrXwp9CTD42fOWYmA0NglOybwl3pc+UUdGKpw==
command: sh -c "npm install && npm run develop"
db:
container_name: postgres
image: postgres
restart: always
volumes:
- ./db:/var/lib/postgresql/data
environment:
POSTGRES_USER: strapi
POSTGRES_PASSWORD: strapi
POSTGRES_DB: strapi