-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
39 lines (37 loc) · 1.45 KB
/
docker-compose.yaml
File metadata and controls
39 lines (37 loc) · 1.45 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
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Docker Compose reference guide at
# https://docs.docker.com/go/compose-spec-reference/
# Here the instructions define your application as a service called "server".
# This service is built from the Dockerfile in the current directory.
# You can add other services your application may depend on here, such as a
# database or a cache. For examples, see the Awesome Compose repository:
# https://github.com/docker/awesome-compose
services:
server:
build:
context: ./frontend/my-app
environment:
NODE_ENV: development
env_file:
- ./frontend/my-app/.env.local
ports:
- 3000:3000
working_dir: /usr/src/app
# Run as root in dev to avoid file permission issues when the host
# directory is bind-mounted (Windows host paths can make non-root users
# unable to write files inside the container). This is safe for local
# development only.
user: "0:0"
volumes:
- ./frontend/my-app:/usr/src/app
- node_modules:/usr/src/app/node_modules
# Put Next build artifacts in a container-managed named volume so
# Turbopack/Next.js can write files without hitting host permission issues.
- next_build:/usr/src/app/.next
command: npm run dev
volumes:
node_modules:
driver: local
# Named volume for Next build output to avoid writing into host filesystem
next_build:
driver: local