Add separate compose files for port exposure options
- docker-compose-frontend.yml: No port exposure (default)
- docker-compose-frontend-expose.yml: Expose ports to host
- run-test-frontend.sh: Test script with --expose-port {on|off} option
- cleanup-frontend.sh: Cleanup script with --expose-port option
This commit is contained in:
99
docker-compose-frontend-expose.yml
Normal file
99
docker-compose-frontend-expose.yml
Normal file
@@ -0,0 +1,99 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: harborforge-test-mysql
|
||||
restart: "no"
|
||||
tmpfs:
|
||||
- /var/lib/mysql
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-harborforge_root}
|
||||
MYSQL_DATABASE: ${MYSQL_DATABASE:-harborforge}
|
||||
MYSQL_USER: ${MYSQL_USER:-harborforge}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-harborforge_pass}
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- test-network
|
||||
|
||||
wizard:
|
||||
build:
|
||||
context: ../AbstractWizard
|
||||
dockerfile: Dockerfile
|
||||
image: harborforge-test-wizard:dev
|
||||
container_name: harborforge-test-wizard
|
||||
user: 0:0
|
||||
restart: "no"
|
||||
volumes:
|
||||
- wizard_config:/config
|
||||
environment:
|
||||
CONFIG_DIR: /config
|
||||
LISTEN_ADDR: "0.0.0.0:8080"
|
||||
MAX_BACKUPS: "5"
|
||||
CORS_ORIGINS: http://localhost:18080
|
||||
ports:
|
||||
- "18080:8080"
|
||||
networks:
|
||||
- test-network
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ../HarborForge.Backend
|
||||
dockerfile: Dockerfile
|
||||
image: harborforge-test-backend:dev
|
||||
container_name: harborforge-test-backend
|
||||
restart: "no"
|
||||
volumes:
|
||||
- wizard_config:/config:ro
|
||||
environment:
|
||||
CONFIG_DIR: /config
|
||||
CONFIG_FILE: harborforge.json
|
||||
SECRET_KEY: ${SECRET_KEY:-change_me_in_production}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
DATABASE_URL: mysql+pymysql://harborforge:harborforge_pass@mysql:3306/harborforge
|
||||
ports:
|
||||
- "8000:8000"
|
||||
networks:
|
||||
- test-network
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ../HarborForge.Frontend
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_WIZARD_PORT: 8080
|
||||
VITE_WIZARD_HOST: wizard
|
||||
image: harborforge-test-frontend:dev
|
||||
container_name: harborforge-test-frontend
|
||||
restart: "no"
|
||||
environment:
|
||||
VITE_API_BASE_URL: http://localhost:8000
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
- test-network
|
||||
|
||||
test:
|
||||
build:
|
||||
context: ./HarborForge.Frontend.Test
|
||||
dockerfile: Dockerfile
|
||||
image: harborforge-test-runner:dev
|
||||
container_name: harborforge-test-runner
|
||||
restart: "no"
|
||||
environment:
|
||||
BASE_URL: http://localhost:3000
|
||||
WEB_SERVER_URL: http://localhost:3000
|
||||
WIZARD_URL: http://localhost:18080/wizard
|
||||
WIZARD_API_URL: http://localhost:18080
|
||||
CHROME_DEBUGGING_PORT: 9222
|
||||
networks:
|
||||
- test-network
|
||||
|
||||
volumes:
|
||||
wizard_config:
|
||||
|
||||
networks:
|
||||
test-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user