-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
compose.yaml
50 lines (46 loc) · 1.9 KB
/
compose.yaml
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
# specify the version of docker-compose
version: '3.8'
# define the services/containers to be run
services:
# we can use any name for the service. A standard naming convention is to use "server" for the server
server:
# specify the build context for the web service
# this is the directory where the Dockerfile for the web service is located
build:
context: .
dockerfile: Dockerfile
# specify the ports to expose for the web service
# the first number is the port on the host machine
# the second number is the port inside the container
ports:
- 3000:3000
# specify the environment variables for the web service
# these environment variables will be available inside the container
environment:
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- NEXTAUTH_URL=${NEXTAUTH_URL}
- NEXTAUTH_URL_INTERNAL=${NEXTAUTH_URL_INTERNAL}
- NEXT_DEFAULT_PASSWORD=42455SKHDKSHF
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
- DATABASE_URL=${DATABASE_URL}
- EDGE_STORE_ACCESS_KEY=${EDGE_STORE_ACCESS_KEY}
- EDGE_STORE_SECRET_KEY=${EDGE_STORE_SECRET_KEY}
# this is for docker compose watch mode
# anything mentioned under develop will be watched for changes by docker compose watch and it will perform the action mentioned
develop:
# we specify the files to watch for changes
watch:
# it'll watch for changes in package.json and package-lock.json and rebuild the container if there are any changes
- path: ./package.json
action: rebuild
- path: ./package-lock.json
action: rebuild
# it'll watch for changes in the frontend directory and sync the changes with the container real time
- path: ./next.config.js
action: rebuild
- path: .
target: /app
action: sync
# define the volumes to be used by the services
volumes:
db-data: