diff --git a/samples/agentic-autogen/compose.yaml b/samples/agentic-autogen/compose.yaml index 1dc22e36..4dc40a24 100644 --- a/samples/agentic-autogen/compose.yaml +++ b/samples/agentic-autogen/compose.yaml @@ -5,21 +5,21 @@ services: context: ./src dockerfile: Dockerfile ports: - - 3000:3000 + - 3000:3000 environment: - - MISTRAL_API_KEY=${MISTRAL_API_KEY} + - MISTRAL_API_KEY=${MISTRAL_API_KEY} restart: unless-stopped healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/health + - CMD + - curl + - -f + - http://localhost:3000/health interval: 30s timeout: 10s retries: 3 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/agentic-langgraph/compose.yaml b/samples/agentic-langgraph/compose.yaml index d11c64ac..c4dd39e2 100644 --- a/samples/agentic-langgraph/compose.yaml +++ b/samples/agentic-langgraph/compose.yaml @@ -5,30 +5,30 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress environment: TAVILY_API_KEY: null LLM_URL: http://llm/api/v1/ LLM_MODEL: default OPENAI_API_KEY: FAKE_TOKEN depends_on: - - llm + - llm deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M llm: environment: - - OPENAI_API_KEY=FAKE_TOKEN + - OPENAI_API_KEY=FAKE_TOKEN image: defangio/openai-access-gateway:latest ports: - - target: 80 - published: 80 - protocol: tcp - mode: host + - target: 80 + published: 80 + protocol: tcp + mode: host x-defang-llm: true deploy: resources: diff --git a/samples/agentic-strands/compose.yaml b/samples/agentic-strands/compose.yaml index f9b145ef..3b1eb67b 100644 --- a/samples/agentic-strands/compose.yaml +++ b/samples/agentic-strands/compose.yaml @@ -4,40 +4,40 @@ services: build: context: ./app ports: - - target: 5001 - published: 5001 - mode: ingress + - target: 5001 + published: 5001 + mode: ingress environment: LLM_URL: http://llm/api/v1/ LLM_MODEL: default OPENAI_API_KEY: SAMPLE_TOKEN healthcheck: test: - - CMD - - python3 - - -c - - import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:5001/health').status - == 200 else exit(1) + - CMD + - python3 + - -c + - import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:5001/health').status + == 200 else exit(1) interval: 30s timeout: 5s retries: 3 start_period: 10s depends_on: - - llm + - llm deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M llm: environment: OPENAI_API_KEY: SAMPLE_TOKEN image: defangio/openai-access-gateway ports: - - target: 80 - published: 80 - protocol: tcp - mode: host + - target: 80 + published: 80 + protocol: tcp + mode: host x-defang-llm: true deploy: resources: diff --git a/samples/angular-express/compose.yaml b/samples/angular-express/compose.yaml index dfc59827..17df9a28 100644 --- a/samples/angular-express/compose.yaml +++ b/samples/angular-express/compose.yaml @@ -4,25 +4,25 @@ services: build: context: ./frontend ports: - - target: 80 - published: 80 - mode: ingress + - target: 80 + published: 80 + mode: ingress restart: unless-stopped deploy: resources: reservations: memory: 64M depends_on: - - backend + - backend backend: build: context: ./backend ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress environment: - - PORT=3000 + - PORT=3000 restart: unless-stopped deploy: resources: diff --git a/samples/arduino-wifi/compose.yaml b/samples/arduino-wifi/compose.yaml index 4f363fe7..b4311914 100644 --- a/samples/arduino-wifi/compose.yaml +++ b/samples/arduino-wifi/compose.yaml @@ -8,16 +8,16 @@ services: deploy: resources: reservations: - cpus: '1.0' + cpus: "1.0" memory: 512M ports: - - mode: ingress - target: 8081 - published: 8081 + - mode: ingress + target: 8081 + published: 8081 healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:8081/ + - CMD + - python3 + - -c + - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:8081/ diff --git a/samples/bullmq-bullboard-redis/compose.yaml b/samples/bullmq-bullboard-redis/compose.yaml index b7969095..ee5f6ccf 100644 --- a/samples/bullmq-bullboard-redis/compose.yaml +++ b/samples/bullmq-bullboard-redis/compose.yaml @@ -6,25 +6,25 @@ services: context: ./board dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 environment: - - REDIS=redis://redisx:6379 - - BOARD_PASSWORD - - QUEUE + - REDIS=redis://redisx:6379 + - BOARD_PASSWORD + - QUEUE healthcheck: test: - - CMD - - curl - - -f - - 127.0.0.1:3000 + - CMD + - curl + - -f + - 127.0.0.1:3000 depends_on: - - redisx + - redisx deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M api: restart: unless-stopped @@ -32,24 +32,24 @@ services: context: ./api dockerfile: Dockerfile ports: - - mode: ingress - target: 3001 - published: 3001 + - mode: ingress + target: 3001 + published: 3001 environment: - - REDIS=redis://redisx:6379 - - QUEUE + - REDIS=redis://redisx:6379 + - QUEUE healthcheck: test: - - CMD - - curl - - -f - - 127.0.0.1:3001 + - CMD + - curl + - -f + - 127.0.0.1:3001 depends_on: - - redisx + - redisx deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M worker: restart: unless-stopped @@ -57,25 +57,25 @@ services: replicas: 1 resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M build: context: ./worker dockerfile: Dockerfile environment: - - REDIS=redis://redisx:6379 - - QUEUE + - REDIS=redis://redisx:6379 + - QUEUE depends_on: - - redisx + - redisx redisx: image: redis:6.2 x-defang-redis: true restart: unless-stopped ports: - - mode: host - target: 6379 + - mode: host + target: 6379 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/crewai/compose.yaml b/samples/crewai/compose.yaml index 95af62bf..3064c20a 100644 --- a/samples/crewai/compose.yaml +++ b/samples/crewai/compose.yaml @@ -6,25 +6,25 @@ services: POSTGRES_PASSWORD: null x-defang-postgres: true ports: - - mode: host - target: 5432 - published: 5432 + - mode: host + target: 5432 + published: 5432 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M redis: image: redis:6.2 x-defang-redis: true ports: - - mode: host - target: 6379 - published: 6379 + - mode: host + target: 6379 + published: 6379 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M app: build: @@ -32,10 +32,10 @@ services: dockerfile: Dockerfile command: ./run.sh ports: - - 8000:8000 + - 8000:8000 depends_on: - - postgres - - redis + - postgres + - redis environment: DJANGO_SETTINGS_MODULE: config.settings DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=require # remove sslmode for Playground @@ -43,12 +43,13 @@ services: CELERY_BROKER_URL: redis://redis:6379/0 CELERY_RESULT_BACKEND: redis://redis:6379/0 DJANGO_SECRET_KEY: null + SSL_MODE: null healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8000/ + - CMD + - curl + - -f + - http://localhost:8000/ interval: 5s timeout: 2s retries: 10 @@ -56,7 +57,7 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M worker: build: @@ -64,20 +65,21 @@ services: dockerfile: Dockerfile command: celery -A config worker -l info depends_on: - - postgres - - redis - - chat - - embedding + - postgres + - redis + - chat + - embedding environment: DJANGO_SETTINGS_MODULE: config.settings DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=require # remove sslmode for Playground REDIS_URL: redis://redis:6379/0 OPENAI_API_KEY: defang DJANGO_SECRET_KEY: null + SSL_MODE: null deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M chat: provider: @@ -90,7 +92,7 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M embedding: provider: @@ -103,5 +105,5 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/csharp-dotnet/compose.yaml b/samples/csharp-dotnet/compose.yaml index 2cebac4a..4a495396 100644 --- a/samples/csharp-dotnet/compose.yaml +++ b/samples/csharp-dotnet/compose.yaml @@ -6,11 +6,11 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 80 - published: 8080 - mode: ingress + - target: 80 + published: 8080 + mode: ingress deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/django-celery/compose.yaml b/samples/django-celery/compose.yaml index 016f6651..0d145065 100644 --- a/samples/django-celery/compose.yaml +++ b/samples/django-celery/compose.yaml @@ -6,23 +6,23 @@ services: context: ./app dockerfile: Dockerfile environment: - - SECRET_KEY - - REDIS_URL=redis://broker:6379/0 - - POSTGRES_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres + - SECRET_KEY + - REDIS_URL=redis://broker:6379/0 + - POSTGRES_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres depends_on: - - database - - migrate - - broker + - database + - migrate + - broker ports: - - mode: ingress - target: 8000 - published: 8000 + - mode: ingress + target: 8000 + published: 8000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8000/health/ + - CMD + - curl + - -f + - http://localhost:8000/health/ interval: 30s timeout: 10s retries: 3 @@ -30,24 +30,24 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M migrate: - restart: 'no' + restart: "no" build: context: ./app dockerfile: Dockerfile environment: - - SECRET_KEY - - REDIS_URL=redis://broker:6379/0 - - POSTGRES_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres + - SECRET_KEY + - REDIS_URL=redis://broker:6379/0 + - POSTGRES_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres depends_on: - - database + - database command: python manage.py migrate deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M worker: restart: unless-stopped @@ -55,57 +55,57 @@ services: context: ./app dockerfile: Dockerfile environment: - - SECRET_KEY - - REDIS_URL=redis://broker:6379/0 - - POSTGRES_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres + - SECRET_KEY + - REDIS_URL=redis://broker:6379/0 + - POSTGRES_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres depends_on: - - database - - broker - - migrate + - database + - broker + - migrate command: celery -A django_celery worker --loglevel=info deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M database: image: postgres:16 x-defang-postgres: true ports: - - mode: host - target: 5432 - published: 5432 + - mode: host + target: 5432 + published: 5432 environment: - - POSTGRES_PASSWORD + - POSTGRES_PASSWORD healthcheck: test: - - CMD-SHELL - - pg_isready -U postgres + - CMD-SHELL + - pg_isready -U postgres interval: 10s timeout: 5s retries: 5 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M broker: image: redis:7.1 x-defang-redis: true ports: - - mode: host - target: 6379 - published: 6379 + - mode: host + target: 6379 + published: 6379 healthcheck: test: - - CMD - - redis-cli - - ping + - CMD + - redis-cli + - ping interval: 10s timeout: 5s retries: 5 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/django-postgres/compose.yaml b/samples/django-postgres/compose.yaml index 77ce6eab..92dcde90 100644 --- a/samples/django-postgres/compose.yaml +++ b/samples/django-postgres/compose.yaml @@ -5,37 +5,37 @@ services: image: postgres:16 x-defang-postgres: true environment: - - POSTGRES_DB=django - - POSTGRES_USER=django - - POSTGRES_PASSWORD + - POSTGRES_DB=django + - POSTGRES_USER=django + - POSTGRES_PASSWORD ports: - - mode: host - target: 5432 - published: 5432 + - mode: host + target: 5432 + published: 5432 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M django: restart: unless-stopped build: ./app ports: - - mode: ingress - target: 8000 - published: 8000 + - mode: ingress + target: 8000 + published: 8000 environment: - - DB_HOST=db - - DEBUG=False - - POSTGRES_USER=django - - POSTGRES_DB=django - - POSTGRES_PASSWORD - - SECRET_KEY - - ALLOWED_HOSTS + - DB_HOST=db + - DEBUG=False + - POSTGRES_USER=django + - POSTGRES_DB=django + - POSTGRES_PASSWORD + - SECRET_KEY + - ALLOWED_HOSTS depends_on: - - db + - db deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/django-railpack/compose.yaml b/samples/django-railpack/compose.yaml index 5130c432..50cc5d80 100644 --- a/samples/django-railpack/compose.yaml +++ b/samples/django-railpack/compose.yaml @@ -5,15 +5,15 @@ services: build: context: ./app ports: - - mode: ingress - target: 8000 + - mode: ingress + target: 8000 environment: - - DEBUG=False + - DEBUG=False command: - - python manage.py migrate && python manage.py createsuperauto && gunicorn defang_sample.wsgi:application - --bind 0.0.0.0:8000 + - python manage.py migrate && python manage.py createsuperauto && gunicorn defang_sample.wsgi:application + --bind 0.0.0.0:8000 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/django-redis-postgres/compose.yaml b/samples/django-redis-postgres/compose.yaml index cda82f6d..ab05a6c5 100644 --- a/samples/django-redis-postgres/compose.yaml +++ b/samples/django-redis-postgres/compose.yaml @@ -5,67 +5,67 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 8000 - published: 8000 - mode: ingress + - target: 8000 + published: 8000 + mode: ingress environment: - - REDIS_URL=redis://redis-service:6379 - - POSTGRES_URL=postgres://djangouser:${POSTGRES_PASSWORD}@postgres-service:5432/djangodatabase? - - SECRET_KEY + - REDIS_URL=redis://redis-service:6379 + - POSTGRES_URL=postgres://djangouser:${POSTGRES_PASSWORD}@postgres-service:5432/djangodatabase? + - SECRET_KEY healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:8000/ + - CMD + - python3 + - -c + - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:8000/ interval: 10s depends_on: - - redis-service - - postgres-service - - migrate + - redis-service + - postgres-service + - migrate deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M redis-service: image: redis:6.2 ports: - - mode: host - target: 6379 + - mode: host + target: 6379 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M migrate: - restart: 'no' + restart: "no" build: context: ./app dockerfile: Dockerfile command: python manage.py migrate depends_on: - - postgres-service + - postgres-service environment: - - POSTGRES_URL=postgres://djangouser:${POSTGRES_PASSWORD}@postgres-service:5432/djangodatabase? - - SECRET_KEY + - POSTGRES_URL=postgres://djangouser:${POSTGRES_PASSWORD}@postgres-service:5432/djangodatabase? + - SECRET_KEY deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M postgres-service: image: postgres:16.4 ports: - - mode: host - target: 5432 + - mode: host + target: 5432 environment: - - POSTGRES_PASSWORD - - POSTGRES_DB=djangodatabase - - POSTGRES_USER=djangouser + - POSTGRES_PASSWORD + - POSTGRES_DB=djangodatabase + - POSTGRES_USER=djangouser deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/django/compose.yaml b/samples/django/compose.yaml index 6712e279..9b4bb227 100644 --- a/samples/django/compose.yaml +++ b/samples/django/compose.yaml @@ -6,12 +6,12 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8000 + - mode: ingress + target: 8000 environment: - - DEBUG=False + - DEBUG=False deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/elysia/compose.yaml b/samples/elysia/compose.yaml index 0c2251a8..cff51c3b 100644 --- a/samples/elysia/compose.yaml +++ b/samples/elysia/compose.yaml @@ -7,11 +7,11 @@ services: dockerfile: Dockerfile target: production ports: - - target: 3000 - mode: ingress - published: 3000 + - target: 3000 + mode: ingress + published: 3000 deploy: resources: reservations: - cpus: '0.50' + cpus: "0.50" memory: 512M diff --git a/samples/fastapi-postgres-pubsub/compose.yaml b/samples/fastapi-postgres-pubsub/compose.yaml index 38c4f0e4..4b4a8854 100644 --- a/samples/fastapi-postgres-pubsub/compose.yaml +++ b/samples/fastapi-postgres-pubsub/compose.yaml @@ -11,13 +11,13 @@ services: DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=${SSL_MODE} SSL_MODE: null ports: - - 8000:8000 + - 8000:8000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8000/healthz + - CMD + - curl + - -f + - http://localhost:8000/healthz interval: 30s timeout: 5s retries: 3 @@ -25,7 +25,7 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M app_b: build: @@ -37,13 +37,13 @@ services: environment: DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=${SSL_MODE} ports: - - 8001:8000 + - 8001:8000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8000/healthz + - CMD + - curl + - -f + - http://localhost:8000/healthz interval: 30s timeout: 5s retries: 3 @@ -51,7 +51,7 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M postgres: image: postgres:16 @@ -59,14 +59,14 @@ services: environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} ports: - - mode: host - target: 5432 - published: 5432 + - mode: host + target: 5432 + published: 5432 x-defang-postgres: true healthcheck: test: - - CMD-SHELL - - pg_isready -U postgres -d postgres + - CMD-SHELL + - pg_isready -U postgres -d postgres interval: 10s timeout: 5s retries: 5 @@ -74,5 +74,5 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/fastapi-postgres/compose.yaml b/samples/fastapi-postgres/compose.yaml index ab670dd1..7f09364c 100644 --- a/samples/fastapi-postgres/compose.yaml +++ b/samples/fastapi-postgres/compose.yaml @@ -6,30 +6,30 @@ services: context: ./fastapi dockerfile: Dockerfile ports: - - mode: ingress - target: 8000 - published: 8000 + - mode: ingress + target: 8000 + published: 8000 environment: - - DB_URL=postgres://postgres:${POSTGRES_PASSWORD}@db:5432/postgres + - DB_URL=postgres://postgres:${POSTGRES_PASSWORD}@db:5432/postgres depends_on: - - db + - db deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M db: image: postgres:15 restart: unless-stopped environment: - - POSTGRES_USER=postgres - - POSTGRES_PASSWORD - - POSTGRES_DB=postgres + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD + - POSTGRES_DB=postgres ports: - - mode: host - target: 5432 + - mode: host + target: 5432 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/fastapi/compose.yaml b/samples/fastapi/compose.yaml index 628c2046..a7868307 100644 --- a/samples/fastapi/compose.yaml +++ b/samples/fastapi/compose.yaml @@ -6,11 +6,11 @@ services: context: ./fastapi dockerfile: Dockerfile ports: - - mode: ingress - target: 8000 - published: 8000 + - mode: ingress + target: 8000 + published: 8000 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/feathersjs/compose.yaml b/samples/feathersjs/compose.yaml index c1363424..1befd236 100644 --- a/samples/feathersjs/compose.yaml +++ b/samples/feathersjs/compose.yaml @@ -5,14 +5,14 @@ services: context: ./src dockerfile: Dockerfile ports: - - target: 3030 - published: 3030 - protocol: tcp - mode: ingress + - target: 3030 + published: 3030 + protocol: tcp + mode: ingress environment: - - NODE_ENV=production + - NODE_ENV=production deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/flask-railpack/compose.yaml b/samples/flask-railpack/compose.yaml index 6e9fd956..afdbdc8d 100644 --- a/samples/flask-railpack/compose.yaml +++ b/samples/flask-railpack/compose.yaml @@ -7,16 +7,16 @@ services: deploy: resources: reservations: - cpus: '1.0' + cpus: "1.0" memory: 512M ports: - - mode: ingress - target: 5000 - published: 5000 + - mode: ingress + target: 5000 + published: 5000 healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:5000/ + - CMD + - python3 + - -c + - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:5000/ diff --git a/samples/flask/compose.yaml b/samples/flask/compose.yaml index adde5097..08f74f86 100644 --- a/samples/flask/compose.yaml +++ b/samples/flask/compose.yaml @@ -8,16 +8,16 @@ services: deploy: resources: reservations: - cpus: '1.0' + cpus: "1.0" memory: 512M ports: - - mode: ingress - target: 5000 - published: 5000 + - mode: ingress + target: 5000 + published: 5000 healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:5000/ + - CMD + - python3 + - -c + - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:5000/ diff --git a/samples/golang-http-form/compose.yaml b/samples/golang-http-form/compose.yaml index 84e33c54..a7fabd14 100644 --- a/samples/golang-http-form/compose.yaml +++ b/samples/golang-http-form/compose.yaml @@ -6,15 +6,15 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 deploy: resources: reservations: memory: 50M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ diff --git a/samples/golang-http/compose.yaml b/samples/golang-http/compose.yaml index 30d58a03..1d6702bb 100644 --- a/samples/golang-http/compose.yaml +++ b/samples/golang-http/compose.yaml @@ -6,15 +6,15 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 deploy: resources: reservations: memory: 50M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ diff --git a/samples/golang-mongodb/compose.yaml b/samples/golang-mongodb/compose.yaml index a122170a..46f4a47d 100644 --- a/samples/golang-mongodb/compose.yaml +++ b/samples/golang-mongodb/compose.yaml @@ -6,40 +6,40 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 - published: 8080 + - mode: ingress + target: 8080 + published: 8080 environment: - - MONGO_URI=mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@db:27017/taskmanager + - MONGO_URI=mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@db:27017/taskmanager healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ depends_on: - - db + - db deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M db: image: mongo:5 restart: unless-stopped ports: - - mode: host - target: 27017 + - mode: host + target: 27017 environment: - - MONGO_INITDB_ROOT_USERNAME - - MONGO_INITDB_ROOT_PASSWORD + - MONGO_INITDB_ROOT_USERNAME + - MONGO_INITDB_ROOT_PASSWORD volumes: - - db_data:/data/db + - db_data:/data/db x-defang-mongodb: true deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M volumes: db_data: diff --git a/samples/golang-openai/compose.yaml b/samples/golang-openai/compose.yaml index b60f94a9..62351f19 100644 --- a/samples/golang-openai/compose.yaml +++ b/samples/golang-openai/compose.yaml @@ -6,17 +6,17 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 environment: - - OPENAI_KEY + - OPENAI_KEY deploy: resources: reservations: memory: 50M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ diff --git a/samples/golang-railpack/compose.yaml b/samples/golang-railpack/compose.yaml index 6c6fc6f7..88eea774 100644 --- a/samples/golang-railpack/compose.yaml +++ b/samples/golang-railpack/compose.yaml @@ -5,8 +5,8 @@ services: build: context: ./app ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 deploy: resources: reservations: diff --git a/samples/golang-rest-api/compose.yaml b/samples/golang-rest-api/compose.yaml index 1e8cec7a..3e5345b8 100644 --- a/samples/golang-rest-api/compose.yaml +++ b/samples/golang-rest-api/compose.yaml @@ -6,15 +6,15 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 deploy: resources: reservations: memory: 50M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ diff --git a/samples/golang-s3/compose.yaml b/samples/golang-s3/compose.yaml index bb1803d7..8ecd7e71 100644 --- a/samples/golang-s3/compose.yaml +++ b/samples/golang-s3/compose.yaml @@ -6,18 +6,18 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 environment: - - AWS_ACCESS_KEY - - AWS_SECRET_KEY + - AWS_ACCESS_KEY + - AWS_SECRET_KEY deploy: resources: reservations: memory: 50M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ diff --git a/samples/golang-slackbot/compose.yaml b/samples/golang-slackbot/compose.yaml index d3c1e146..df58ce5e 100644 --- a/samples/golang-slackbot/compose.yaml +++ b/samples/golang-slackbot/compose.yaml @@ -6,19 +6,19 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 8080 + - mode: ingress + target: 8080 environment: - - SLACK_TOKEN - - SLACK_CHANNEL_ID + - SLACK_TOKEN + - SLACK_CHANNEL_ID healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/google-adk/compose.yaml b/samples/google-adk/compose.yaml index bc3ebaa1..ba43e0f2 100644 --- a/samples/google-adk/compose.yaml +++ b/samples/google-adk/compose.yaml @@ -3,19 +3,19 @@ services: agent: build: . ports: - - 8080:8080 + - 8080:8080 healthcheck: test: - - CMD - - python3 - - -c - - import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:8080/').status==200 - else exit(1) + - CMD + - python3 + - -c + - import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:8080/').status==200 + else exit(1) interval: 30s timeout: 10s retries: 5 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/hasura/compose.yaml b/samples/hasura/compose.yaml index b5e5956f..46b5e707 100644 --- a/samples/hasura/compose.yaml +++ b/samples/hasura/compose.yaml @@ -6,36 +6,36 @@ services: dockerfile: Dockerfile context: ./hasura ports: - - target: 8080 - published: 8080 - mode: ingress + - target: 8080 + published: 8080 + mode: ingress environment: - - HASURA_GRAPHQL_ADMIN_SECRET - - HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres - - HASURA_GRAPHQL_ENABLE_CONSOLE=true - - HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public - - HASURA_GRAPHQL_EXPERIMENTAL_FEATURES=naming_convention - - HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION=graphql-default - - HASURA_GRAPHQL_MIGRATIONS_DIR=/hasura/migrations - - HASURA_GRAPHQL_METADATA_DIR=/hasura/metadata - - POSTGRES_PASSWORD + - HASURA_GRAPHQL_ADMIN_SECRET + - HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres + - HASURA_GRAPHQL_ENABLE_CONSOLE=true + - HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public + - HASURA_GRAPHQL_EXPERIMENTAL_FEATURES=naming_convention + - HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION=graphql-default + - HASURA_GRAPHQL_MIGRATIONS_DIR=/hasura/migrations + - HASURA_GRAPHQL_METADATA_DIR=/hasura/metadata + - POSTGRES_PASSWORD deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M database: image: postgres:16 x-defang-postgres: true ports: - - target: 5432 - mode: host + - target: 5432 + mode: host environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=postgres - - POSTGRES_PASSWORD + - POSTGRES_USER=postgres + - POSTGRES_DB=postgres + - POSTGRES_PASSWORD deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/html-css-js/compose.yaml b/samples/html-css-js/compose.yaml index 5e28564c..4fd7999c 100644 --- a/samples/html-css-js/compose.yaml +++ b/samples/html-css-js/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 8080 - published: 8080 - mode: ingress + - target: 8080 + published: 8080 + mode: ingress deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ diff --git a/samples/huginn/compose.yaml b/samples/huginn/compose.yaml index 70b10366..1263e08c 100644 --- a/samples/huginn/compose.yaml +++ b/samples/huginn/compose.yaml @@ -4,43 +4,43 @@ services: image: ghcr.io/huginn/huginn restart: unless-stopped ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress deploy: resources: reservations: - cpus: '1.0' + cpus: "1.0" memory: 1G healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ interval: 1m30s timeout: 30s retries: 10 environment: - - DATABASE_ADAPTER=postgresql - - DATABASE_NAME=huginn - - DATABASE_USERNAME=huginn - - DATABASE_HOST=db - - DATABASE_PASSWORD="${POSTGRES_PASSWORD}" + - DATABASE_ADAPTER=postgresql + - DATABASE_NAME=huginn + - DATABASE_USERNAME=huginn + - DATABASE_HOST=db + - DATABASE_PASSWORD="${POSTGRES_PASSWORD}" depends_on: - - db + - db db: image: postgres:16 environment: - - POSTGRES_USER=huginn - - POSTGRES_DB=huginn - - POSTGRES_PASSWORD + - POSTGRES_USER=huginn + - POSTGRES_DB=huginn + - POSTGRES_PASSWORD ports: - - mode: host - target: 5432 - published: 5432 + - mode: host + target: 5432 + published: 5432 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/imgproxy/compose.yaml b/samples/imgproxy/compose.yaml index 9c89556c..dcc9f18f 100644 --- a/samples/imgproxy/compose.yaml +++ b/samples/imgproxy/compose.yaml @@ -4,10 +4,10 @@ services: restart: unless-stopped image: darthsim/imgproxy ports: - - mode: ingress - target: 8080 - published: 8080 - protocol: tcp + - mode: ingress + target: 8080 + published: 8080 + protocol: tcp deploy: resources: reservations: diff --git a/samples/javalin/compose.yaml b/samples/javalin/compose.yaml index e02d2ca0..5c802c0c 100644 --- a/samples/javalin/compose.yaml +++ b/samples/javalin/compose.yaml @@ -4,17 +4,17 @@ services: build: context: ./app ports: - - target: 7000 - published: 7000 - mode: ingress + - target: 7000 + published: 7000 + mode: ingress healthcheck: test: - - CMD - - curl - - -f - - http://localhost:7000/ + - CMD + - curl + - -f + - http://localhost:7000/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/jupyter-postgres/compose.yaml b/samples/jupyter-postgres/compose.yaml index d9df7a68..488a2dd2 100644 --- a/samples/jupyter-postgres/compose.yaml +++ b/samples/jupyter-postgres/compose.yaml @@ -4,13 +4,13 @@ services: build: context: ./jupyter ports: - - mode: ingress - target: 8888 - published: 8888 + - mode: ingress + target: 8888 + published: 8888 deploy: resources: limits: - cpus: '1.0' + cpus: "1.0" memory: 1G environment: JUPYTER_TOKEN: null @@ -18,27 +18,27 @@ services: DATABASE_HOST: db healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8888/login + - CMD + - curl + - -f + - http://localhost:8888/login depends_on: - - db + - db db: image: postgres:14 x-defang-postgres: true ports: - - mode: host - target: 5432 - published: 5432 + - mode: host + target: 5432 + published: 5432 healthcheck: test: - - CMD-SHELL - - pg_isready -U postgres + - CMD-SHELL + - pg_isready -U postgres environment: POSTGRES_PASSWORD: null deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/langchain/compose.yaml b/samples/langchain/compose.yaml index ce7a3de7..80ab3eee 100644 --- a/samples/langchain/compose.yaml +++ b/samples/langchain/compose.yaml @@ -5,20 +5,20 @@ services: context: ./app dockerfile: Dockerfile environment: - - OPENAI_KEY + - OPENAI_KEY ports: - - target: 80 - published: 8080 - protocol: tcp - mode: ingress + - target: 80 + published: 8080 + protocol: tcp + mode: ingress healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080/ + - CMD + - curl + - -f + - http://localhost:8080/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/managed-llm-provider/compose.yaml b/samples/managed-llm-provider/compose.yaml index 6612bf8e..a5ea5e83 100644 --- a/samples/managed-llm-provider/compose.yaml +++ b/samples/managed-llm-provider/compose.yaml @@ -5,25 +5,25 @@ services: context: ./app dockerfile: Dockerfile ports: - - 8000:8000 + - 8000:8000 restart: always environment: - - LLM_URL=http://llm/api/v1/ - - LLM_MODEL=default - - OPENAI_API_KEY=FAKE_TOKEN + - LLM_URL=http://llm/api/v1/ + - LLM_MODEL=default + - OPENAI_API_KEY=FAKE_TOKEN healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:8000/health + - CMD + - python3 + - -c + - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:8000/health interval: 30s timeout: 5s retries: 3 start_period: 5s depends_on: - - llm + - llm deploy: resources: reservations: @@ -36,7 +36,7 @@ services: model: ai/smollm2 x-defang-llm: true environment: - - OPENAI_API_KEY=FAKE_TOKEN + - OPENAI_API_KEY=FAKE_TOKEN deploy: resources: reservations: diff --git a/samples/managed-llm/compose.yaml b/samples/managed-llm/compose.yaml index f2285add..c89e8597 100644 --- a/samples/managed-llm/compose.yaml +++ b/samples/managed-llm/compose.yaml @@ -5,49 +5,49 @@ services: context: ./app dockerfile: Dockerfile ports: - - 8000:8000 + - 8000:8000 restart: always environment: - - LLM_URL=http://llm/api/v1/ - - LLM_MODEL=default - - OPENAI_API_KEY=FAKE_TOKEN + - LLM_URL=http://llm/api/v1/ + - LLM_MODEL=default + - OPENAI_API_KEY=FAKE_TOKEN healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:8000/ + - CMD + - python3 + - -c + - import sys, urllib.request; urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:8000/ interval: 30s timeout: 5s retries: 3 start_period: 5s depends_on: - - llm + - llm networks: - - default - - private + - default + - private deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M llm: x-defang-llm: true image: docker.io/defangio/openai-access-gateway:latest ports: - - target: 80 - published: 80 - protocol: tcp - mode: host + - target: 80 + published: 80 + protocol: tcp + mode: host networks: - - private + - private environment: - - OPENAI_API_KEY=FAKE_TOKEN + - OPENAI_API_KEY=FAKE_TOKEN deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M networks: default: null diff --git a/samples/mastra-nextjs/compose.yaml b/samples/mastra-nextjs/compose.yaml index d057b190..b63f1d11 100644 --- a/samples/mastra-nextjs/compose.yaml +++ b/samples/mastra-nextjs/compose.yaml @@ -6,48 +6,48 @@ services: context: ./app dockerfile: Dockerfile environment: - - DB_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres - - DB_SSL - - LLM_MODEL - - GITHUB_TOKEN + - DB_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres + - DB_SSL + - LLM_MODEL + - GITHUB_TOKEN restart: unless-stopped ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000 + - CMD + - curl + - -f + - http://localhost:3000 depends_on: - - database + - database deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M database: image: postgres:16 x-defang-postgres: true restart: always environment: - - POSTGRES_PASSWORD - - POSTGRES_DB=postgres - - POSTGRES_USER=postgres + - POSTGRES_PASSWORD + - POSTGRES_DB=postgres + - POSTGRES_USER=postgres ports: - - mode: host - target: 5432 + - mode: host + target: 5432 healthcheck: test: - - CMD-SHELL - - pg_isready -h localhost -U postgres -d postgres + - CMD-SHELL + - pg_isready -h localhost -U postgres -d postgres interval: 5s timeout: 5s retries: 10 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/mcp/compose.yaml b/samples/mcp/compose.yaml index 3893995d..6e60a5e6 100644 --- a/samples/mcp/compose.yaml +++ b/samples/mcp/compose.yaml @@ -5,35 +5,35 @@ services: context: ./service-1 dockerfile: Dockerfile ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress deploy: resources: reservations: memory: 256M environment: - - MCP_SERVICE_URL=http://service-2:8000 + - MCP_SERVICE_URL=http://service-2:8000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ depends_on: - - service-2 + - service-2 service-2: build: context: ./service-2 dockerfile: Dockerfile ports: - - target: 8000 - published: 8000 - mode: host + - target: 8000 + published: 8000 + mode: host environment: - - ANTHROPIC_API_KEY + - ANTHROPIC_API_KEY deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/metabase/compose.yaml b/samples/metabase/compose.yaml index a8f1e116..9cab01b6 100644 --- a/samples/metabase/compose.yaml +++ b/samples/metabase/compose.yaml @@ -4,27 +4,27 @@ services: restart: unless-stopped image: metabase/metabase:latest ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/api/health + - CMD + - curl + - -f + - http://localhost:3000/api/health interval: 1m30s timeout: 30s retries: 5 environment: - - MB_DB_TYPE=postgres - - MB_DB_DBNAME - - MB_DB_PORT - - MB_DB_USER - - MB_DB_PASS - - MB_DB_HOST + - MB_DB_TYPE=postgres + - MB_DB_DBNAME + - MB_DB_PORT + - MB_DB_USER + - MB_DB_PASS + - MB_DB_HOST deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 1024M diff --git a/samples/n8n/compose.yaml b/samples/n8n/compose.yaml index 0fd59ca6..bbfe4ab9 100644 --- a/samples/n8n/compose.yaml +++ b/samples/n8n/compose.yaml @@ -5,54 +5,54 @@ services: x-defang-postgres: true restart: always environment: - - POSTGRES_USER=n8nuser - - POSTGRES_DB=n8ndatabase - - POSTGRES_PASSWORD + - POSTGRES_USER=n8nuser + - POSTGRES_DB=n8ndatabase + - POSTGRES_PASSWORD healthcheck: test: - - CMD-SHELL - - pg_isready -h localhost -U n8nuser -d n8ndatabase + - CMD-SHELL + - pg_isready -h localhost -U n8nuser -d n8ndatabase interval: 5s timeout: 5s retries: 10 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M n8n: image: docker.n8n.io/n8nio/n8n restart: always environment: - - DB_TYPE=postgresdb - - DB_POSTGRESDB_HOST=postgres - - DB_POSTGRESDB_PORT=5432 - - DB_POSTGRESDB_DATABASE=n8ndatabase - - DB_POSTGRESDB_USER=n8nuser - - N8N_RUNNERS_ENABLED=true - - N8N_HOST=n8n - - N8N_PORT=5678 - - N8N_PROTOCOL=https - - N8N_PROXY_HOPS=1 - - NODE_ENV=production - - WEBHOOK_URL=https://n8n - - DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED - - DB_POSTGRESDB_SSL_ENABLED - - N8N_ENCRYPTION_KEY - - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD} + - DB_TYPE=postgresdb + - DB_POSTGRESDB_HOST=postgres + - DB_POSTGRESDB_PORT=5432 + - DB_POSTGRESDB_DATABASE=n8ndatabase + - DB_POSTGRESDB_USER=n8nuser + - N8N_RUNNERS_ENABLED=true + - N8N_HOST=n8n + - N8N_PORT=5678 + - N8N_PROTOCOL=https + - N8N_PROXY_HOPS=1 + - NODE_ENV=production + - WEBHOOK_URL=https://n8n + - DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED + - DB_POSTGRESDB_SSL_ENABLED + - N8N_ENCRYPTION_KEY + - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD} ports: - - 5678:5678 + - 5678:5678 links: - - postgres + - postgres depends_on: postgres: condition: service_healthy healthcheck: test: - - CMD-SHELL - - node --eval "const r = await fetch('http://localhost:5678/healthz'); if(r.status - === 200 || r.status === 201) { process.exit(0); } else { process.exit(1); - };" + - CMD-SHELL + - node --eval "const r = await fetch('http://localhost:5678/healthz'); if(r.status + === 200 || r.status === 201) { process.exit(0); } else { process.exit(1); + };" interval: 10s timeout: 5s retries: 5 @@ -60,5 +60,5 @@ services: deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/nextjs-blog/compose.yaml b/samples/nextjs-blog/compose.yaml index bcb964a2..017c122d 100644 --- a/samples/nextjs-blog/compose.yaml +++ b/samples/nextjs-blog/compose.yaml @@ -6,9 +6,9 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: diff --git a/samples/nextjs-claude/compose.yaml b/samples/nextjs-claude/compose.yaml index 2040b107..af0a95dc 100644 --- a/samples/nextjs-claude/compose.yaml +++ b/samples/nextjs-claude/compose.yaml @@ -5,18 +5,18 @@ services: context: ./ui dockerfile: Dockerfile ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress deploy: resources: reservations: memory: 256M environment: - - ANTHROPIC_API_KEY + - ANTHROPIC_API_KEY healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nextjs-cv/compose.yaml b/samples/nextjs-cv/compose.yaml index 7a404999..7b5bfdf7 100644 --- a/samples/nextjs-cv/compose.yaml +++ b/samples/nextjs-cv/compose.yaml @@ -6,19 +6,19 @@ services: dockerfile: Dockerfile restart: unless-stopped ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress environment: - - NODE_ENV=production + - NODE_ENV=production healthcheck: test: - - CMD - - wget - - --spider - - http://localhost:3000/ + - CMD + - wget + - --spider + - http://localhost:3000/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/nextjs-documentation/compose.yaml b/samples/nextjs-documentation/compose.yaml index eeaceae6..ede196c7 100644 --- a/samples/nextjs-documentation/compose.yaml +++ b/samples/nextjs-documentation/compose.yaml @@ -6,9 +6,9 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: diff --git a/samples/nextjs-postgres/compose.yaml b/samples/nextjs-postgres/compose.yaml index bf374bb0..7a2d87b3 100644 --- a/samples/nextjs-postgres/compose.yaml +++ b/samples/nextjs-postgres/compose.yaml @@ -5,9 +5,9 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 3000 - published: 3000 - mode: ingress + - target: 3000 + published: 3000 + mode: ingress environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: null @@ -17,16 +17,16 @@ services: POSTGRES_SSL: null healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000 + - CMD + - curl + - -f + - http://localhost:3000 depends_on: - - database + - database deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M database: image: postgres:16 @@ -34,11 +34,11 @@ services: environment: POSTGRES_PASSWORD: null ports: - - target: 5432 - published: 5432 - mode: host + - target: 5432 + published: 5432 + mode: host deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/nextjs-railpack/compose.yaml b/samples/nextjs-railpack/compose.yaml index 377d8901..73026fa9 100644 --- a/samples/nextjs-railpack/compose.yaml +++ b/samples/nextjs-railpack/compose.yaml @@ -5,13 +5,13 @@ services: build: context: ./app ports: - - target: 3000 - mode: ingress - published: 3000 + - target: 3000 + mode: ingress + published: 3000 environment: PORT: 3000 deploy: resources: reservations: - cpus: '0.25' + cpus: "0.25" memory: 256M diff --git a/samples/nextjs/compose.yaml b/samples/nextjs/compose.yaml index e12d0248..5c281403 100644 --- a/samples/nextjs/compose.yaml +++ b/samples/nextjs/compose.yaml @@ -6,13 +6,13 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 3000 - mode: ingress - published: 3000 + - target: 3000 + mode: ingress + published: 3000 healthcheck: test: wget -q --spider http://localhost:3000/ || exit 1 deploy: resources: reservations: - cpus: '0.25' + cpus: "0.25" memory: 256M diff --git a/samples/nocodb/compose.yaml b/samples/nocodb/compose.yaml index 7fd8c35d..dfc44e8d 100644 --- a/samples/nocodb/compose.yaml +++ b/samples/nocodb/compose.yaml @@ -10,11 +10,11 @@ services: NC_S3_ACCESS_KEY: null NC_S3_ACCESS_SECRET: null ports: - - target: 8080 - published: 8080 - mode: ingress + - target: 8080 + published: 8080 + mode: ingress deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/nodejs-chatroom/compose.yaml b/samples/nodejs-chatroom/compose.yaml index f1c7a3a1..46167c8d 100644 --- a/samples/nodejs-chatroom/compose.yaml +++ b/samples/nodejs-chatroom/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nodejs-express/compose.yaml b/samples/nodejs-express/compose.yaml index 661568f6..d641862c 100644 --- a/samples/nodejs-express/compose.yaml +++ b/samples/nodejs-express/compose.yaml @@ -5,16 +5,16 @@ services: build: context: ./app ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nodejs-form/compose.yaml b/samples/nodejs-form/compose.yaml index dbe75f01..e42bc4b8 100644 --- a/samples/nodejs-form/compose.yaml +++ b/samples/nodejs-form/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nodejs-http/compose.yaml b/samples/nodejs-http/compose.yaml index 3af87db7..c47ac4e7 100644 --- a/samples/nodejs-http/compose.yaml +++ b/samples/nodejs-http/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nodejs-openai/compose.yaml b/samples/nodejs-openai/compose.yaml index 84122290..92271117 100644 --- a/samples/nodejs-openai/compose.yaml +++ b/samples/nodejs-openai/compose.yaml @@ -6,18 +6,18 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 environment: - - OPENAI_KEY + - OPENAI_KEY deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nodejs-react-postgres/compose.yaml b/samples/nodejs-react-postgres/compose.yaml index 5e262cb6..a3865e4f 100644 --- a/samples/nodejs-react-postgres/compose.yaml +++ b/samples/nodejs-react-postgres/compose.yaml @@ -6,30 +6,30 @@ services: context: ./client dockerfile: Dockerfile args: - - REACT_APP_API_URL=https://-server--3010.prod1.defang.dev + - REACT_APP_API_URL=https://-server--3010.prod1.defang.dev ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 1g depends_on: - - server + - server server: restart: unless-stopped build: context: ./server dockerfile: Dockerfile ports: - - target: 3010 - mode: ingress - published: 3010 + - target: 3010 + mode: ingress + published: 3010 environment: - - DATABASE_URL + - DATABASE_URL deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/nodejs-rest-api/compose.yaml b/samples/nodejs-rest-api/compose.yaml index d14d31f7..6690a56b 100644 --- a/samples/nodejs-rest-api/compose.yaml +++ b/samples/nodejs-rest-api/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nodejs-s3/compose.yaml b/samples/nodejs-s3/compose.yaml index e6280485..8d6e2c67 100644 --- a/samples/nodejs-s3/compose.yaml +++ b/samples/nodejs-s3/compose.yaml @@ -6,19 +6,19 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 environment: - - AWS_ACCESS_KEY - - AWS_SECRET_KEY + - AWS_ACCESS_KEY + - AWS_SECRET_KEY deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ diff --git a/samples/nounly/compose.yaml b/samples/nounly/compose.yaml index 7bbcde15..64e267e0 100644 --- a/samples/nounly/compose.yaml +++ b/samples/nounly/compose.yaml @@ -10,20 +10,20 @@ services: memory: 512M healthcheck: test: - - CMD - - wget - - --spider - - -qO- - - http://localhost:2345/v1/status + - CMD + - wget + - --spider + - -qO- + - http://localhost:2345/v1/status ports: - - 2345:2345 + - 2345:2345 environment: PORT: 2345 REDIS: redis:6379 PROJECT_HONEYPOT_KEY: null - SHARED_SECRETS: '{}' + SHARED_SECRETS: "{}" depends_on: - - redis + - redis redis: restart: always image: redis:alpine @@ -32,9 +32,9 @@ services: reservations: memory: 512M ports: - - target: 6379 - published: 6379 - protocol: tcp - mode: host + - target: 6379 + published: 6379 + protocol: tcp + mode: host platform: linux/arm64 x-defang-redis: true diff --git a/samples/ollama/compose.yaml b/samples/ollama/compose.yaml index b1652ac7..74bcde93 100644 --- a/samples/ollama/compose.yaml +++ b/samples/ollama/compose.yaml @@ -6,41 +6,41 @@ services: dockerfile: Dockerfile shm_size: 16gb ports: - - target: 8000 - mode: host + - target: 8000 + mode: host deploy: resources: reservations: - cpus: '2.0' + cpus: "2.0" memory: 8192M environment: - - LOAD_MODEL=llama3.2:1b + - LOAD_MODEL=llama3.2:1b healthcheck: test: - - CMD - - curl - - -s - - http://localhost:8000/ + - CMD + - curl + - -s + - http://localhost:8000/ ui: build: context: ui dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -s - - http://localhost:3000/ + - CMD + - curl + - -s + - http://localhost:3000/ environment: - - OLLAMA_ENDPOINT=http://ollama:8000 - - LOAD_MODEL=llama3.2:1b + - OLLAMA_ENDPOINT=http://ollama:8000 + - LOAD_MODEL=llama3.2:1b depends_on: - - ollama + - ollama diff --git a/samples/phoenix-postgres/compose.yaml b/samples/phoenix-postgres/compose.yaml index 8b58b231..f32ebdec 100644 --- a/samples/phoenix-postgres/compose.yaml +++ b/samples/phoenix-postgres/compose.yaml @@ -6,15 +6,15 @@ services: context: ./server dockerfile: Dockerfile ports: - - target: 4000 - mode: ingress - published: 4000 + - target: 4000 + mode: ingress + published: 4000 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 1024M environment: - - PORT=4000 - - SECRET_KEY_BASE - - DATABASE_URL + - PORT=4000 + - SECRET_KEY_BASE + - DATABASE_URL diff --git a/samples/platformatic/compose.yaml b/samples/platformatic/compose.yaml index 8c3fd80b..0367cdef 100644 --- a/samples/platformatic/compose.yaml +++ b/samples/platformatic/compose.yaml @@ -5,9 +5,9 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 3042 - published: 3042 - mode: ingress + - target: 3042 + published: 3042 + mode: ingress environment: NODE_ENV: production PLT_SERVER_HOSTNAME: 0.0.0.0 @@ -19,5 +19,5 @@ services: deploy: resources: limits: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/python-form/compose.yaml b/samples/python-form/compose.yaml index 2be8922e..111e8948 100644 --- a/samples/python-form/compose.yaml +++ b/samples/python-form/compose.yaml @@ -6,15 +6,15 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 5000 + - mode: ingress + target: 5000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5000/ + - CMD + - curl + - -f + - http://localhost:5000/ diff --git a/samples/python-implicit-gpu/compose.yaml b/samples/python-implicit-gpu/compose.yaml index a230b72e..397592aa 100644 --- a/samples/python-implicit-gpu/compose.yaml +++ b/samples/python-implicit-gpu/compose.yaml @@ -8,17 +8,17 @@ services: deploy: resources: reservations: - cpus: '1.0' + cpus: "1.0" memory: 2048M devices: - - capabilities: - - gpu + - capabilities: + - gpu ports: - - mode: ingress - target: 5000 + - mode: ingress + target: 5000 healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5000/ + - CMD + - curl + - -f + - http://localhost:5000/ diff --git a/samples/python-minimal/compose.yaml b/samples/python-minimal/compose.yaml index dccb7992..d6f4c9b7 100644 --- a/samples/python-minimal/compose.yaml +++ b/samples/python-minimal/compose.yaml @@ -6,15 +6,15 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 5000 + - mode: ingress + target: 5000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5000/ + - CMD + - curl + - -f + - http://localhost:5000/ diff --git a/samples/python-openai/compose.yaml b/samples/python-openai/compose.yaml index 88ad047d..9d131ec2 100644 --- a/samples/python-openai/compose.yaml +++ b/samples/python-openai/compose.yaml @@ -6,17 +6,17 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 5000 + - mode: ingress + target: 5000 environment: - - OPENAI_KEY + - OPENAI_KEY deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5000/ + - CMD + - curl + - -f + - http://localhost:5000/ diff --git a/samples/python-rest-api/compose.yaml b/samples/python-rest-api/compose.yaml index 272809b4..765ce6ab 100644 --- a/samples/python-rest-api/compose.yaml +++ b/samples/python-rest-api/compose.yaml @@ -6,15 +6,15 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 5000 + - mode: ingress + target: 5000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5000/ + - CMD + - curl + - -f + - http://localhost:5000/ diff --git a/samples/python-s3/compose.yaml b/samples/python-s3/compose.yaml index aa78a355..455ec785 100644 --- a/samples/python-s3/compose.yaml +++ b/samples/python-s3/compose.yaml @@ -6,18 +6,18 @@ services: context: ./app dockerfile: Dockerfile ports: - - mode: ingress - target: 5000 + - mode: ingress + target: 5000 environment: - - AWS_ACCESS_KEY - - AWS_SECRET_KEY + - AWS_ACCESS_KEY + - AWS_SECRET_KEY deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5000/ + - CMD + - curl + - -f + - http://localhost:5000/ diff --git a/samples/rails/compose.yaml b/samples/rails/compose.yaml index bca98c0c..d96fea67 100644 --- a/samples/rails/compose.yaml +++ b/samples/rails/compose.yaml @@ -6,48 +6,48 @@ services: context: ./app dockerfile: Dockerfile env_file: - - .env + - .env environment: POSTGRES_PASSWORD: null ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 1GB healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000 + - CMD + - curl + - -f + - http://localhost:3000 interval: 10s timeout: 5s retries: 5 depends_on: - - db - - migrate + - db + - migrate migrate: - restart: 'no' + restart: "no" build: context: ./app dockerfile: Dockerfile env_file: - - .env + - .env environment: POSTGRES_PASSWORD: null command: - - bin/rails - - db:prepare + - bin/rails + - db:prepare depends_on: db: condition: service_healthy deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M db: restart: unless-stopped @@ -56,12 +56,12 @@ services: environment: POSTGRES_PASSWORD: null ports: - - mode: host - target: 5432 + - mode: host + target: 5432 healthcheck: test: - - CMD-SHELL - - pg_isready -U postgres + - CMD-SHELL + - pg_isready -U postgres interval: 10s timeout: 5s retries: 5 diff --git a/samples/react-vite-railpack/compose.yaml b/samples/react-vite-railpack/compose.yaml index fae2b1dd..72d406d6 100644 --- a/samples/react-vite-railpack/compose.yaml +++ b/samples/react-vite-railpack/compose.yaml @@ -7,9 +7,9 @@ services: environment: PORT: 5173 ports: - - target: 5173 - published: 5173 - mode: ingress + - target: 5173 + published: 5173 + mode: ingress deploy: resources: reservations: diff --git a/samples/react/compose.yaml b/samples/react/compose.yaml index 059aaa4d..9ab76924 100644 --- a/samples/react/compose.yaml +++ b/samples/react/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 5173 - published: 5173 - mode: ingress + - target: 5173 + published: 5173 + mode: ingress deploy: resources: reservations: memory: 512M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5173/ + - CMD + - curl + - -f + - http://localhost:5173/ diff --git a/samples/redis-js/compose.yaml b/samples/redis-js/compose.yaml index 4ebd6c94..df229d5d 100644 --- a/samples/redis-js/compose.yaml +++ b/samples/redis-js/compose.yaml @@ -3,27 +3,27 @@ services: app: build: ./app ports: - - 3000:3000 + - 3000:3000 environment: - - REDISX_URL=redis://redisx:6379 + - REDISX_URL=redis://redisx:6379 depends_on: - - redisx + - redisx deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M redisx: image: redis:latest x-defang-redis: true restart: unless-stopped ports: - - target: 6379 - published: 6379 - protocol: tcp - mode: host + - target: 6379 + published: 6379 + protocol: tcp + mode: host deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/rocket/compose.yaml b/samples/rocket/compose.yaml index df1dfdf5..83b1d50a 100644 --- a/samples/rocket/compose.yaml +++ b/samples/rocket/compose.yaml @@ -5,17 +5,17 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 8080 - published: 8080 - mode: ingress + - target: 8080 + published: 8080 + mode: ingress healthcheck: test: - - CMD - - curl - - -f - - http://localhost:8080 + - CMD + - curl + - -f + - http://localhost:8080 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/sailsjs-postgres/compose.yaml b/samples/sailsjs-postgres/compose.yaml index 67f60e51..8b53588c 100644 --- a/samples/sailsjs-postgres/compose.yaml +++ b/samples/sailsjs-postgres/compose.yaml @@ -4,28 +4,28 @@ services: restart: unless-stopped build: ./app ports: - - target: 1337 - published: 1337 - mode: ingress + - target: 1337 + published: 1337 + mode: ingress environment: DATABASE_URL: null SESSION_SECRET: null command: - - sails - - lift - - --prod + - sails + - lift + - --prod networks: - - app-network + - app-network healthcheck: test: - - CMD - - curl - - -f - - http://localhost:1337/ + - CMD + - curl + - -f + - http://localhost:1337/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M networks: app-network: diff --git a/samples/sailsjs/compose.yaml b/samples/sailsjs/compose.yaml index f37b6002..2f35fc52 100644 --- a/samples/sailsjs/compose.yaml +++ b/samples/sailsjs/compose.yaml @@ -5,18 +5,18 @@ services: build: context: ./sails ports: - - target: 1337 - published: 1337 - protocol: tcp - mode: ingress + - target: 1337 + published: 1337 + protocol: tcp + mode: ingress volumes: - - ./sails:/usr/src/app - - /usr/src/app/node_modules + - ./sails:/usr/src/app + - /usr/src/app/node_modules environment: - - NODE_ENV=production + - NODE_ENV=production command: sails lift --prod deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M diff --git a/samples/svelte-mysql/compose.yaml b/samples/svelte-mysql/compose.yaml index 5095b703..bcc2aa2a 100644 --- a/samples/svelte-mysql/compose.yaml +++ b/samples/svelte-mysql/compose.yaml @@ -9,14 +9,14 @@ services: MYSQL_USER: admin MYSQL_PASSWORD: Defang12345 volumes: - - mysql_data:/var/lib/mysql + - mysql_data:/var/lib/mysql ports: - - mode: host - target: 3306 + - mode: host + target: 3306 deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M app: restart: unless-stopped @@ -27,19 +27,19 @@ services: DATABASE_PASSWORD: Defang12345 DATABASE_NAME: todoApp ports: - - 3001:3001 + - 3001:3001 depends_on: - - db + - db healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3001/ + - CMD + - curl + - -f + - http://localhost:3001/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M volumes: mysql_data: null diff --git a/samples/sveltekit-mongodb/compose.yaml b/samples/sveltekit-mongodb/compose.yaml index d387c954..76e406b9 100644 --- a/samples/sveltekit-mongodb/compose.yaml +++ b/samples/sveltekit-mongodb/compose.yaml @@ -13,35 +13,35 @@ services: PORT: 3000 MONGODB_URI: mongodb://mongo:27017/musicdb ports: - - 3000:3000 + - 3000:3000 depends_on: - - mongo + - mongo healthcheck: test: - - CMD - - curl - - -f - - http://localhost:3000/ + - CMD + - curl + - -f + - http://localhost:3000/ deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M mongo: restart: unless-stopped image: mongo:latest ports: - - mode: host - target: 27017 + - mode: host + target: 27017 volumes: - - mongo-data:/data/db + - mongo-data:/data/db environment: MONGO_INITDB_DATABASE: musicdb x-defang-mongodb: true deploy: resources: reservations: - cpus: '0.5' + cpus: "0.5" memory: 512M volumes: mongo-data: null diff --git a/samples/sveltekit/compose.yaml b/samples/sveltekit/compose.yaml index 47641e93..93cc1baf 100644 --- a/samples/sveltekit/compose.yaml +++ b/samples/sveltekit/compose.yaml @@ -6,11 +6,11 @@ services: context: ./sveltekit dockerfile: Dockerfile ports: - - target: 3000 - mode: ingress - published: 3000 + - target: 3000 + mode: ingress + published: 3000 deploy: resources: reservations: - cpus: '0.50' + cpus: "0.50" memory: 512M diff --git a/samples/vllm/compose.yaml b/samples/vllm/compose.yaml index 3cc399f3..659c61ea 100644 --- a/samples/vllm/compose.yaml +++ b/samples/vllm/compose.yaml @@ -4,65 +4,65 @@ services: restart: unless-stopped image: ghcr.io/mistralai/mistral-src/vllm:latest ports: - - mode: host - target: 8000 + - mode: host + target: 8000 command: - - --host - - 0.0.0.0 - - --model - - TheBloke/Mistral-7B-Instruct-v0.2-AWQ - - --quantization - - awq - - --dtype - - auto - - --tensor-parallel-size - - '1' - - --gpu-memory-utilization - - '.95' - - --max-model-len - - '8000' + - --host + - 0.0.0.0 + - --model + - TheBloke/Mistral-7B-Instruct-v0.2-AWQ + - --quantization + - awq + - --dtype + - auto + - --tensor-parallel-size + - "1" + - --gpu-memory-utilization + - ".95" + - --max-model-len + - "8000" deploy: resources: reservations: - cpus: '2.0' + cpus: "2.0" memory: 8192M devices: - - capabilities: - - gpu - count: 1 + - capabilities: + - gpu + count: 1 healthcheck: test: - - CMD - - python3 - - -c - - import sys, urllib.request;urllib.request.urlopen(sys.argv[1]).read() - - http://localhost:8000/health + - CMD + - python3 + - -c + - import sys, urllib.request;urllib.request.urlopen(sys.argv[1]).read() + - http://localhost:8000/health interval: 1m environment: - - HF_TOKEN + - HF_TOKEN ui: restart: unless-stopped build: context: ui dockerfile: Dockerfile ports: - - mode: ingress - target: 3000 - published: 3000 + - mode: ingress + target: 3000 + published: 3000 deploy: resources: reservations: memory: 256M healthcheck: test: - - CMD - - wget - - --spider - - http://localhost:3000 + - CMD + - wget + - --spider + - http://localhost:3000 interval: 10s timeout: 2s retries: 10 environment: - - OPENAI_BASE_URL=http://mistral:8000/v1/ + - OPENAI_BASE_URL=http://mistral:8000/v1/ depends_on: - - mistral + - mistral diff --git a/samples/vuejs/compose.yaml b/samples/vuejs/compose.yaml index d4f8f8e2..ff98764d 100644 --- a/samples/vuejs/compose.yaml +++ b/samples/vuejs/compose.yaml @@ -6,16 +6,16 @@ services: context: ./app dockerfile: Dockerfile ports: - - target: 5173 - published: 5173 - mode: ingress + - target: 5173 + published: 5173 + mode: ingress deploy: resources: reservations: memory: 512M healthcheck: test: - - CMD - - curl - - -f - - http://localhost:5173/ + - CMD + - curl + - -f + - http://localhost:5173/