Consolidate dockerfiles and add docs for development

This will reduce the number of files that need to be managed and dependencies that need updated at the same time.
This commit is contained in:
Jake Spain 2023-01-23 17:15:18 -05:00
parent 3a771dfadd
commit 71b4edcd1d
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113
35 changed files with 386 additions and 627 deletions

89
docker/docker-compose.yml Normal file
View file

@ -0,0 +1,89 @@
# For local development run with a dummy provider
version: '3.8'
services:
redis-server:
# This should match the major version used in the vmpooler helm chart
image: redis:6
command: "redis-server --requirepass vmpooler"
volumes:
- type: bind
source: ./data/redis
target: /data
ports:
- "6379:6379"
redis-commander:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOST=redis-server
- REDIS_PASSWORD=vmpooler
- HTTP_USER=admin
- HTTP_PASSWORD=admin
ports:
- 8080:8081
links:
- redis-server
jaeger-aio:
image: jaegertracing/all-in-one:1
ports:
- "14250:14250"
- "8081:16686"
user: '1001'
read_only: true
cap_drop:
- ALL
vmpooler-api:
# Uncomment image and comment out build, which will allow you to use an
# image with local gem source instead of from a git source.
# See build instructions in Dockerfile.local
# image: vmpooler-local
build:
context: ./
dockerfile: Dockerfile
volumes:
- type: bind
source: ./data/vmpooler.yaml
target: /etc/vmpooler/vmpooler.yaml
ports:
- "8082:4567"
environment:
- VMPOOLER_DEBUG=true # for use of dummy auth
- VMPOOLER_CONFIG_FILE=/etc/vmpooler/vmpooler.yaml
- REDIS_SERVER=redis-server
- REDIS_PASSWORD=vmpooler
- LOGFILE=/dev/null
- VMPOOLER_TRACING_ENABLED=true
- VMPOOLER_TRACING_JAEGER_HOST=http://jaeger-aio:14268/api/traces
command: api
links:
- redis-server
- jaeger-aio
vmpooler-manager:
# Uncomment image and comment out build, which will allow you to use an
# image with local gem source instead of from a git source.
# See build instructions in Dockerfile.local
# image: vmpooler-local
build:
context: ./
dockerfile: Dockerfile
volumes:
- type: bind
source: ./data/vmpooler.yaml
target: /etc/vmpooler/vmpooler.yaml
ports:
- "8083:4567"
environment:
- VMPOOLER_DEBUG=true # for use of dummy auth
- VMPOOLER_CONFIG_FILE=/etc/vmpooler/vmpooler.yaml
- REDIS_SERVER=redis-server
- REDIS_PASSWORD=vmpooler
- LOGFILE=/dev/null
- VMPOOLER_TRACING_ENABLED=true
- VMPOOLER_TRACING_JAEGER_HOST=http://jaeger-aio:14268/api/traces
command: manager
links:
- redis-server
- jaeger-aio