Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
143 lines (121 loc) · 5.33 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
143 lines (121 loc) · 5.33 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# ==============================================================================
# DOCKER COMPOSE FOR DEVELOPMENT MODE WITH HOT RELOAD
# ==============================================================================
#
# This file configures the Docker development environment with:
# - Automatic hot reload (reloads on every code change)
# - Mounted volumes to sync code between host and container
# - Development environment variables
# - Polling enabled for file change detection
#
# USAGE:
# docker-compose -f docker-compose.dev.yml --env-file .env.dev.docker up
#
# OR with the automated script:
# ./docker-run.sh dev
#
# ==============================================================================
services:
webapp-dev:
# Container name (visible with `docker ps`)
container_name: webapp-dev
# Docker image name that will be created
image: ever-teams-webapp:dev
# Build configuration
build:
context: .
dockerfile: .deploy/web/Dockerfile.dev
# Environment variables for development
environment:
NODE_ENV: development
IS_DOCKER: "true"
GAUZY_API_SERVER_URL: ${GAUZY_API_SERVER_URL:-https://api.ever.team}
NEXT_PUBLIC_GAUZY_API_SERVER_URL: ${NEXT_PUBLIC_GAUZY_API_SERVER_URL:-https://api.ever.team}
# Enable polling for hot reload in Docker
# Required because file watchers don't always work well with Docker volumes
CHOKIDAR_USEPOLLING: "true"
WATCHPACK_POLLING: "true"
# Other environment variables
AUTH_SECRET: ${AUTH_SECRET:-ever-app-auth-secret}
NEXT_PUBLIC_CAPTCHA_TYPE: ${NEXT_PUBLIC_CAPTCHA_TYPE:-}
NEXT_PUBLIC_CAPTCHA_SITE_KEY: ${NEXT_PUBLIC_CAPTCHA_SITE_KEY:-}
CAPTCHA_SECRET_KEY: ${CAPTCHA_SECRET_KEY:-}
# OAuth
NEXT_PUBLIC_GOOGLE_APP_NAME: ${NEXT_PUBLIC_GOOGLE_APP_NAME:-ever-google}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
# Also the GitHub App slug of the GitHub integration (Ever-operated: ever-github)
NEXT_PUBLIC_GITHUB_APP_NAME: ${NEXT_PUBLIC_GITHUB_APP_NAME:-}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID:-}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET:-}
# Meet
NEXT_PUBLIC_MEET_TYPE: ${NEXT_PUBLIC_MEET_TYPE:-Jitsi}
# Your Jitsi server domain (Ever-operated: meet.ever.team)
NEXT_PUBLIC_MEET_DOMAIN: ${NEXT_PUBLIC_MEET_DOMAIN:-}
# Logs
LOG_FOLDER_MAX_SIZE: ${LOG_FOLDER_MAX_SIZE:-10}
NEXT_PUBLIC_LOG_FOLDER_MAX_SIZE: ${NEXT_PUBLIC_LOG_FOLDER_MAX_SIZE:-10}
ACTIVE_LOCAL_LOG_SYSTEM: ${ACTIVE_LOCAL_LOG_SYSTEM:-true}
NEXT_PUBLIC_ACTIVE_LOCAL_LOG_SYSTEM: ${NEXT_PUBLIC_ACTIVE_LOCAL_LOG_SYSTEM:-true}
# App Branding
APP_NAME: ${APP_NAME:-Ever Teams}
APP_SIGNATURE: ${APP_SIGNATURE:-Ever Teams}
APP_LOGO_URL: ${APP_LOGO_URL:-https://app.ever.team/assets/ever-teams.png}
APP_LINK: ${APP_LINK:-https://ever.team}
COMPANY_NAME: ${COMPANY_NAME:-Ever Co. LTD}
COMPANY_LINK: ${COMPANY_LINK:-https://ever.co}
# Analytics (optional in dev)
NEXT_PUBLIC_SENTRY_DSN: ${NEXT_PUBLIC_SENTRY_DSN:-}
NEXT_PUBLIC_POSTHOG_KEY: ${NEXT_PUBLIC_POSTHOG_KEY:-}
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${NEXT_PUBLIC_GA_MEASUREMENT_ID:-}
# Load variables from .env.dev.docker file
env_file:
- .env.dev.docker
# Mount source code as volume for hot reload
volumes:
# Web application source code
- ./apps/web:/app/apps/web
# Shared packages
- ./packages:/app/packages
# Configuration files
- ./tsconfig.base.json:/app/tsconfig.base.json
- ./tsconfig.json:/app/tsconfig.json
- ./turbo.json:/app/turbo.json
- ./nx.json:/app/nx.json
# Exclude node_modules to avoid conflicts
# Container's node_modules will be used
- /app/node_modules
- /app/apps/web/node_modules
- /app/apps/web/.next
- /app/packages/constants/node_modules
- /app/packages/hooks/node_modules
- /app/packages/services/node_modules
- /app/packages/types/node_modules
- /app/packages/ui/node_modules
- /app/packages/utils/node_modules
# Automatically restart container on error
restart: unless-stopped
# Map container port 3030 to host port 3030
ports:
- "${UI_PORT:-3030}:3030"
# Network
networks:
- ever-teams-dev-network
# Health check to verify application is running
healthcheck:
test:
[
"CMD",
"node",
"-e",
"require('http').get('http://localhost:3030', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
# Custom command (optional, can be overridden)
# command: yarn dev:web
networks:
ever-teams-dev-network:
driver: bridge