-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.56 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.56 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
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
services:
strapi:
container_name: strapi
build:
context: ./backend
dockerfile: Dockerfile
image: strapi:latest
restart: unless-stopped
env_file:
- ./backend/.env
- ./backend/.docker.env
volumes:
- ./backend/config:/opt/app/config
- ./backend/types:/opt/app/types
- ./backend/src:/opt/app/src
- ./backend/package.json:/opt/package.json
- ./backend/yarn.lock:/opt/yarn.lock
- ./backend/.env:/opt/app/.env
- ./backend/public/uploads:/opt/app/public/uploads
ports:
- 1337:1337
depends_on:
- strapiDB
networks:
- db
- frontend
strapiDB:
container_name: strapiDB
platform: linux/amd64 #for platform error on Apple M1 chips
restart: unless-stopped
env_file: ./backend/.docker.env
image: postgres:12.0-alpine
volumes:
- ./initdb:/docker-entrypoint-initdb.d
- strapi-data:/var/lib/postgresql/data/ #using a volume
ports:
- 5432:5432
networks:
- db
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
- frontend_cache:/app/.next
env_file:
- ./frontend/.env.local
- ./frontend/.docker.env
environment:
- WATCHPACK_POLLING=true
ports:
- 3000:3000
depends_on:
- strapi
networks:
- frontend
volumes:
strapi-data:
frontend_node_modules:
frontend_cache:
networks:
frontend:
driver: bridge
db:
driver: bridge