generated from ThijmenGThN/next-leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (47 loc) · 1.26 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
services:
# ┏━ NextJS | A framework to build web apps.
next:
image: node:20-alpine
command: >
sh -c 'if [ "$PRODUCTION" == "true" ];
then
npm ci
npm run build
npm start
else
npm install
npm run dev
fi'
container_name: next
restart: unless-stopped
working_dir: /app
depends_on: [ pocketbase ]
volumes:
- next_build:/app/.next
- ./node_modules:/app/node_modules
- ./:/app
# ┏━ Pocketbase | An inclusive BAAS database provider.
pocketbase:
image: ghcr.io/muchobien/pocketbase:0.21
container_name: pocketbase
restart: unless-stopped
attach: false
volumes:
- pocketbase_data:/pb_data
- ./src/backend/types.d.ts:/pb_data/types.d.ts
- ./src/backend/migrations:/pb_migrations
- ./src/backend/storage:/pb_data/storage
- ./src/backend/hooks:/pb_hooks
# ┏━ Nginx | Ensures same origin for both services.
nginx:
image: nginx:1.25
depends_on: [ next, pocketbase ]
container_name: router
restart: unless-stopped
volumes: [ "./src/backend/routes:/etc/nginx/conf.d" ]
ports: [ "${PORT:-3000}:3000" ]
attach: false
volumes:
next_build:
next_modules:
pocketbase_data: