78 lines
No EOL
1.9 KiB
YAML
78 lines
No EOL
1.9 KiB
YAML
version: "3"
|
|
services:
|
|
# jsr (based on https://github.com/teidesu/docker-images/blob/main/jsr/docker-compose.yaml)
|
|
jsr-db:
|
|
image: postgres:15
|
|
command: postgres -c 'max_connections=1000'
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: registry
|
|
healthcheck:
|
|
test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"
|
|
interval: 5s
|
|
retries: 20
|
|
start_period: 5s
|
|
volumes:
|
|
- ./.jsr-data/db:/var/lib/postgresql/data
|
|
jsr-gcs:
|
|
image: fsouza/fake-gcs-server:latest
|
|
command: -scheme http -filesystem-root=/gcs-data -port 4080
|
|
volumes:
|
|
- ./.jsr-data/gcs:/gcs-data
|
|
jsr-api:
|
|
depends_on:
|
|
jsr-db:
|
|
condition: service_healthy
|
|
jsr-gcs:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: "curl --fail http://localhost:8001/sitemap.xml || exit 1"
|
|
interval: 5s
|
|
retries: 20
|
|
start_period: 5s
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.jsr
|
|
environment:
|
|
- "DATABASE_URL=postgres://user:password@jsr-db/registry"
|
|
- "GITHUB_CLIENT_ID=fake"
|
|
- "GITHUB_CLIENT_SECRET=fake"
|
|
- "GCS_ENDPOINT=http://jsr-gcs:4080"
|
|
- "MODULES_BUCKET=modules"
|
|
- "PUBLISHING_BUCKET=publishing"
|
|
- "DOCS_BUCKET=docs"
|
|
- "NPM_BUCKET=npm"
|
|
- "REGISTRY_URL=http://localhost:4873"
|
|
- "NPM_URL=http://example.com/unused"
|
|
jsr:
|
|
depends_on:
|
|
jsr-api:
|
|
condition: service_healthy
|
|
image: nginx:1.21
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
ports:
|
|
- "4873:80"
|
|
|
|
# our stuff
|
|
build:
|
|
build:
|
|
context: ../..
|
|
dockerfile: e2e/deno/Dockerfile.build
|
|
environment:
|
|
- GITHUB_TOKEN=${GITHUB_TOKEN}
|
|
depends_on:
|
|
- jsr
|
|
test:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.test
|
|
environment:
|
|
- API_ID=${API_ID}
|
|
- API_HASH=${API_HASH}
|
|
depends_on:
|
|
- jsr
|
|
networks:
|
|
mtcute-e2e: {} |