-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 1.41 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
version: '3.8'
services:
# Application container
web-app:
env_file: ${DOT_ENV_FILE:-.env}
# Ensure specific environment variables are ALWAYS available.
environment:
# Server
- BASE_URL=${BASE_URL:-${SERVER_PROTOCOL:-http}://${SERVER_DOMAIN:-localhost}:${SERVER_PORT:-3000}}
- DB_URL=${DB_URL:-postgresql://postgres:docker@host.docker.internal:5432/my_db_dev?schema=public&connect_timeout=300}
- NEXT_PUBLIC_ENV=${NEXT_PUBLIC_ENV:-development}
- NEXT_SHARP_PATH=${NEXT_SHARP_PATH:-/app/node_modules/sharp}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-DEVELOPMENT}
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:${SERVER_PORT:-3000}}
- NODE_ENV=${NODE_ENV:-development}
build:
context: ./
dockerfile: Dockerfile
args:
nodeVersion: ${NODE_VERSION:-20.1.0}
container_name: ${CONTAINER_NAME:-next-launch}
image: ${IMAGE_NAME:-${CONTAINER_NAME:-next-launch}}:${IMAGE_TAG:-dev}
command:
- "sh"
- "-c"
- "if [ ${NO_AUTO_START:-} ]; then tail -f /dev/null; else node /app/server.js; fi"
ports:
- ${SERVER_PORT:-3000}:${SERVER_PORT:-3000}
volumes:
- .:/app:delegated
- ~/.gitconfig:/root/.gitconfig:delegated
- ~/.ssh:/root/.ssh:delegated
- next-launch-dev-root-vol:/root:delegated
logging:
options:
max-size: "10m"
max-file: "3"
volumes:
next-launch-dev-root-vol: