-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
55 lines (54 loc) · 2.3 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
# Specify current major version of docker compose.
# See https://docs.docker.com/compose/compose-file/compose-versioning/
version: '3'
# For this application, we are using Next.js's environment variable feature to expose
# an environment variable to the browser. See:
# https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser
# By default, this argument is set in the Dockerfile.
# If you are using `yarn dev` (development mode), then you can override this as an
# environment variable using docker compose's `environment` control.
# If you are using `yarn start` (production mode), then you can override this as a build argument.
services:
# Define a service for the Next.js application.
nextjs:
build:
context: ./app
# Uncomment to turn off demo mode when using `yarn start`
# args:
# - NEXT_PUBLIC_DEMO_MODE="false"
command: ["yarn", "dev"]
# Uncomment to turn off demo mode when using `yarn dev`
# environment:
# - NEXT_PUBLIC_DEMO_MODE="false"
ports:
# Expose a port to access the application.
- 3000:3000
# Expose a port for storybook.
- 6006:6006
volumes:
# Mount the app directory for faster local development.
- ./app:/srv
# Use a named volume for the node_modules so that the container uses the guest machine's node_modules dir instead of the host machine's node_modules directory, which might be divergent.
- nextjs_nodemodules:/srv/node_modules
# eligibility-screener:
# build:
# context: ./eligibility-screener/app
# # Run in development mode
# command: ["yarn", "dev"]
# # Load environment variables for local development
# env_file: ./mock-api/app/local.env
# environment:
# - API_HOST=http://mock-api:8080
# - NEXT_PUBLIC_DEMO_MODE="false"
# # Fix running on Apple silicon
# platform: linux/amd64
# ports:
# # Expose a port to access the application.
# - 3000:3000
# # Expose a port for storybook.
# - 6006:6006
# volumes:
# # Use a named volume for the node_modules so that the container uses the guest machine's node_modules dir instead of the host machine's node_modules directory, which might be divergent.
# - nextjs_nodemodules:/srv/node_modules
volumes:
nextjs_nodemodules: