forked from Hithomelabs/CFTunnels
- Add spring-boot-starter-actuator dependency - Configure management port (8081) separate from application port (8080) - Expose /actuator/health and /actuator/info endpoints publicly - Block other actuator endpoints without authentication - Add ActuatorSecurityConfig for actuator-specific security rules - Update Docker Compose to expose management port (5003:8081) - Update Dockerfile to expose ports 8080 and 8081 - Add actuator configuration to all profile-specific properties files
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
services:
|
|
app:
|
|
image: gitea.hithomelabs.com/hithomelabs/cftunnels:${ENV}
|
|
container_name: cftunnels_${ENV}
|
|
ports:
|
|
- ${HOST_PORT}:8080
|
|
- ${MGMT_PORT:-5003}:8081
|
|
environment:
|
|
- CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID}
|
|
- CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
|
|
- CLOUDFLARE_EMAIL=${CLOUDFLARE_EMAIL}
|
|
- ENV=${ENV}
|
|
- OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID}
|
|
- OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
|
|
- HOST_PORT=${HOST_PORT}
|
|
- POSTGRES_USER=${POSTGRES_USERNAME}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- SWAGGER_OAUTH_CLIENT_ID=${SWAGGER_OAUTH_CLIENT_ID}
|
|
env_file:
|
|
- stack.env
|
|
restart: unless-stopped
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: cftunnel-db-${ENV}
|
|
environment:
|
|
POSTGRES_DB: cftunnel
|
|
POSTGRES_USER: ${POSTGRES_USERNAME}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${DB_PORT}:5432"
|
|
volumes:
|
|
- ${DB_PATH}:/var/lib/postgresql/data
|