mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-23 13:46:45 +02:00
Use node http-server with proxy tto unleash
This commit is contained in:
parent
be193b31eb
commit
c889e5a4f5
19
.github/docker-compose.test.yml
vendored
19
.github/docker-compose.test.yml
vendored
@ -15,20 +15,18 @@ services:
|
||||
# The Unleash server contains the Unleash configuration and
|
||||
# communicates with server-side SDKs and the Unleash Proxy
|
||||
frontend:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./frontend/dist:/usr/share/nginx/html
|
||||
command: |
|
||||
sh -c "printf 'server { listen 80; location / { add_header Access-Control-Allow-Origin \"*\" always; root /usr/share/nginx/html; try_files \$uri \$uri/ =404; }}' > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
||||
image: node:alpine
|
||||
working_dir: /app
|
||||
command: npx http-server ./build -p 80 --cors --proxy http://unleash:4242
|
||||
ports:
|
||||
- "3000:80"
|
||||
environment:
|
||||
UNLEASH_API: "http://unleash:4242/"
|
||||
volumes:
|
||||
- ../frontend/build:/app:ro
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost:80/login || exit 1
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost/health || exit 1
|
||||
interval: 1s
|
||||
timeout: 1m
|
||||
retries: 10
|
||||
retries: 5
|
||||
start_period: 45s
|
||||
unleash:
|
||||
image: unleashorg/unleash-enterprise:latest
|
||||
@ -39,6 +37,7 @@ services:
|
||||
DATABASE_URL: "postgres://postgres:unleash@db/unleash"
|
||||
DATABASE_SSL: "false"
|
||||
UNLEASH_LICENSE: "${FRONTEND_TEST_LICENSE}"
|
||||
LOG_LEVEL: "info"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@ -51,7 +50,7 @@ services:
|
||||
db:
|
||||
expose:
|
||||
- "5432"
|
||||
image: postgres
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_DB: "unleash"
|
||||
# trust incoming connections blindly (DON'T DO THIS IN PRODUCTION!)
|
||||
|
Loading…
Reference in New Issue
Block a user