# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. version: '2' services: lando-api: build: context: ./ dockerfile: ./Dockerfile image: lando-api command: ["run", "--host=0.0.0.0", "--port=8888"] ports: - "8888:8888" environment: - PHABRICATOR_URL=https://phabricator-dev.allizom.org/ - PHABRICATOR_ADMIN_API_KEY=api-0123456789012345678901234567 - PHABRICATOR_UNPRIVILEGED_API_KEY=api-0123456789012345678901234567 - DATABASE_URL=postgresql://postgres:password@lando-api.db/lando_api_dev - ENV=localdev - SENTRY_DSN= - LANDO_UI_URL=https://lando.test - PINGBACK_ENABLED=y - PINGBACK_HOST_URL=https://lando-api.test - TRANSPLANT_URL=https://fake-transplant.herokuapp.com/ - TRANSPLANT_USERNAME=autoland - TRANSPLANT_PASSWORD=autoland - TRANSPLANT_API_KEY=set-api-key - PATCH_BUCKET_NAME= - OIDC_IDENTIFIER=https://lando-api.test - OIDC_DOMAIN=https://auth0.test # - CSP_REPORTING_URL=/__cspreport__ - CACHE_REDIS_HOST=redis.cache # - CACHE_REDIS_PORT= # - CACHE_REDIS_PASSWORD= # - CACHE_REDIS_DB= # Setting this to any non-empty value will disable the Celery job system and all # features that rely on it. - DISABLE_CELERY= # See http://docs.celeryproject.org/en/latest/userguide/configuration.html#broker-url # for the full URL format. - CELERY_BROKER_URL=redis://redis.queue/0 # Leave AWS credentials unconfigured in production - AWS_ACCESS_KEY= - AWS_SECRET_KEY= # ------------------------------------------------------------------------ # Local Development Flags, edit in docker-compose.override.yml # https://docs.docker.com/compose/extends/#example-use-case # ------------------------------------------------------------------------ # LOCALDEV_MOCK_AUTH0_USER: Set to 'default' to use a default user with # valid landing permissions in when an auth0 user is required in local # dev. You must still pass a Bearer token header, it can be invalid. # Set to 'inject_valid' to load users from the provided token and inject # LDAP claims for valid landing permission. Set to 'inject_invalid' to # inject invalid permissions. - LOCALDEV_MOCK_AUTH0_USER= # LOCALDEV_MOCK_TRANSPLANT_SUBMIT: Set to 'succeed' to mock the request to # the transplant service which enqueues a landing. This mock will always* # successfully enqueue the landing request and return the request id # immediately. This does NOT mock notifying lando-api when the landing # status changes asynchronously. The status of the landing will remain # as submitted only. You may manually use the Swagger UI to update it. # Set to 'fail' to mock immediate request failure. # * A random number is chosen between 0 and 10,000,000, will crash if # you get the same number twice due to db uniqueness constraint. - LOCALDEV_MOCK_TRANSPLANT_SUBMIT= # So that the container can write volume mounted files during development. user: root volumes: - ./:/app - ./migrations/:/migrations/ # Prevent writing python cache to the host. - caches_pycache:/app/tests/__pycache__/ - caches_cache:/app/.cache/ - caches_pytest_cache:/app/.pytest_cache depends_on: - lando-api.db - redis.cache - redis.queue lando-api.worker: image: lando-api command: ["worker"] environment: - ENV=localdev - SENTRY_DSN= # See http://docs.celeryproject.org/en/stable/getting-started/brokers/redis.html#configuration # for the full URL format. - CELERY_BROKER_URL=redis://redis.queue/0 - OIDC_IDENTIFIER=https://lando-api.test - OIDC_DOMAIN=https://auth0.test # The base URL of the Lando website that users interact with. # e.g. https://lando.test - LANDO_UI_URL=https://lando.test # The email address to send mail from. - MAIL_FROM=email_testing@example.test # The hostname of the SMTP server used to notify Lando users of landing failures. - MAIL_SERVER=smtp - MAIL_PORT=25 # Whether the connection should use an SSL socket immediately, rather than # starttls after connecting, if the server requires it. - MAIL_USE_SSL= # Should the connection use starttls to enable TLS after connecting. - MAIL_USE_TLS= - MAIL_USERNAME= - MAIL_PASSWORD= # Set this flag to any non-empty value to have the worker log a message instead of # connecting to the SMTP server. - MAIL_SUPPRESS_SEND= # A space-delimited list of email addresses. If set this will limit mail sending # to the listed recipients. Mail to recipients not on the list will be logged # instead. Leave this setting empty to allow all email addresses through. - MAIL_RECIPIENT_WHITELIST= user: root volumes: - ./:/app - ./migrations/:/migrations/ # Prevent writing python cache to the host. - caches_cache:/app/.cache/ depends_on: - redis.queue - smtp lando-api.db: image: postgres:9.6-alpine environment: - POSTGRES_PASSWORD=password - POSTGRES_USER=postgres volumes: - postgres_db:/var/lib/postgresql/data - ./docker/postgres-init-scripts/:/docker-entrypoint-initdb.d/ ports: - "54321:5432" redis.cache: image: redis:3.2-alpine # Elasticache version. redis.queue: image: redis:3.2-alpine smtp: image: python:3-alpine command: python3 -u -m smtpd -c DebuggingServer -n --debug 0.0.0.0:25 expose: - "25" volumes: postgres_db: caches_pycache: caches_cache: caches_pytest_cache: