-
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathDockerfile.dev
More file actions
42 lines (32 loc) · 1.29 KB
/
Dockerfile.dev
File metadata and controls
42 lines (32 loc) · 1.29 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
# Wheels Development Dockerfile
# Optimized for local development with hot-reload via volume mounts.
# Usage: docker compose -f docker-compose.dev.yml up
#
# The host project directory is mounted at /app, so code changes
# are reflected immediately without rebuilding the image.
FROM ortussolutions/commandbox:latest
LABEL maintainer="Wheels Core Team"
# Development server configuration
ENV PORT=8080
ENV APP_DIR="/app"
ENV BOX_SERVER_PROFILE="development"
ENV BOX_SERVER_APP_CFENGINE="lucee@6"
ENV BOX_INSTALL=true
ENV WHEELS_ENV="development"
# CFConfig: development-friendly defaults
ENV cfconfig_adminPassword="commandbox"
WORKDIR ${APP_DIR}
# Install CommandBox modules used in development
RUN box install commandbox-dotenv,commandbox-cfconfig --system
# Copy only dependency manifests first for layer caching.
# On `docker compose up`, the full project is volume-mounted over /app,
# so these copies are only used during the initial image build to
# pre-install dependencies and warm up the server.
COPY box.json ${APP_DIR}/box.json
COPY server.json ${APP_DIR}/server.json
# Install project dependencies (cached unless box.json changes)
RUN box install
# Expose the dev server port
EXPOSE ${PORT}
# Start CommandBox server in foreground (keeps container alive)
CMD ["box", "server", "start", "--console"]