Skip to content

Commit 2b19ddc

Browse files
committed
adds docker-compose with .env
1 parent e1ea131 commit 2b19ddc

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

.env

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# GitLab Enforcer Environment Variables
2+
# Replace placeholder values with your actual configuration
3+
4+
# GitLab Configuration
5+
GITLAB_SERVER_URL=https://gitlab.example.com
6+
GITLAB_PERSONAL_ACCESS_TOKEN=your_personal_access_token
7+
8+
# Proxy Configuration (if needed)
9+
HTTP_PROXY_HOST=
10+
HTTP_PROXY_PORT=3128
11+
12+
# Enforcer Configuration
13+
ENFORCER_SCHEDULER_RATE=300000
14+
ENFORCER_SYSTEM_HOOK_TOKEN=your_system_hook_token
15+
16+
# JVM Options (optional, will use defaults from Dockerfile if not specified)
17+
JAVA_OPTS='-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0'
18+
19+
# Spring Profile
20+
SPRING_PROFILES_ACTIVE=prod

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ COPY src ./src
1212
COPY .git ./.git
1313

1414
# Build the application
15-
RUN ./mvnw clean package -DskipTests
15+
RUN ./mvnw clean package -DskipTests -B
1616

1717
# Runtime stage
1818
FROM eclipse-temurin:17-jre-jammy

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
gitlab-enforcer:
3+
image: tjuerge/gitlab-enforcer
4+
build:
5+
context: .
6+
ports:
7+
- "8080:8080"
8+
env_file:
9+
- .env
10+
healthcheck:
11+
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
12+
interval: 30s
13+
timeout: 3s
14+
retries: 3

0 commit comments

Comments
 (0)