syncstorage-rs/docker/docker-compose.mysql.yaml
Taddes 4283c36c64
Some checks failed
Glean probe-scraper / glean-probe-scraper (push) Has been cancelled
Main Workflow - Lint, Build, Test / python-env (push) Has been cancelled
Main Workflow - Lint, Build, Test / rust-env (push) Has been cancelled
Main Workflow - Lint, Build, Test / python-checks (push) Has been cancelled
Main Workflow - Lint, Build, Test / rust-checks (push) Has been cancelled
Main Workflow - Lint, Build, Test / clippy (mysql) (push) Has been cancelled
Main Workflow - Lint, Build, Test / clippy (postgres) (push) Has been cancelled
Main Workflow - Lint, Build, Test / clippy (spanner) (push) Has been cancelled
Main Workflow - Lint, Build, Test / clippy-release (mysql) (push) Has been cancelled
Main Workflow - Lint, Build, Test / clippy-release (postgres) (push) Has been cancelled
Main Workflow - Lint, Build, Test / clippy-release (spanner) (push) Has been cancelled
Main Workflow - Lint, Build, Test / build-and-unit-test-postgres (push) Has been cancelled
Main Workflow - Lint, Build, Test / build-postgres-image (push) Has been cancelled
Main Workflow - Lint, Build, Test / postgres-e2e-tests (push) Has been cancelled
Main Workflow - Lint, Build, Test / build-and-unit-test-mysql (push) Has been cancelled
Main Workflow - Lint, Build, Test / build-mysql-image (push) Has been cancelled
Main Workflow - Lint, Build, Test / mysql-e2e-tests (push) Has been cancelled
Main Workflow - Lint, Build, Test / build-and-unit-test-spanner (push) Has been cancelled
Main Workflow - Lint, Build, Test / build-spanner-image (push) Has been cancelled
Main Workflow - Lint, Build, Test / spanner-e2e-tests (push) Has been cancelled
Build, Tag and Push Container Images to GAR / check (push) Has been cancelled
Build, Tag and Push Container Images to GAR / build-and-push-syncstorage-rs (push) Has been cancelled
Build, Tag and Push Container Images to GAR / build-and-push-syncserver-postgres (push) Has been cancelled
Build, Tag and Push Container Images to GAR / build-and-push-syncstorage-rs-spanner-python-utils (push) Has been cancelled
Build, Tag and Push Container Images to GAR / build-and-push-syncserver-postgres-python-utils (push) Has been cancelled
Build, Tag and Push Container Images to GAR / build-and-push-syncserver-mysql (push) Has been cancelled
Publish Sync docs to pages / build-mdbook (push) Has been cancelled
Publish Sync docs to pages / build-openapi (push) Has been cancelled
Publish Sync docs to pages / combine-and-prepare (push) Has been cancelled
Publish Sync docs to pages / deploy (push) Has been cancelled
test: modernize tests to use pytest (#2192)
test: modernize tests to use pytest
2026-04-30 23:27:52 +03:00

93 lines
2.8 KiB
YAML

# NOTE: This docker-compose file was constructed to create a base for
# use by the End-to-end tests. It has not been fully tested for use in
# constructing a true, stand-alone sync server.
# If you're interested in doing that, please join our community in the
# github issues and comments.
#
# Application runs off of port 8000.
# you can test if it's available with
# curl "http://localhost:8000/__heartbeat__"
services:
sync-db:
image: docker.io/library/mysql:8.0
volumes:
- sync_db_data:/var/lib/mysql
restart: always
ports:
- "3306"
command: --explicit_defaults_for_timestamp
environment:
#MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_ROOT_PASSWORD: random
MYSQL_DATABASE: syncstorage
MYSQL_USER: test
MYSQL_PASSWORD: test
healthcheck:
test: ["CMD-SHELL", "mysqladmin -h 127.0.0.1 -P 3306 -uroot -p$${MYSQL_ROOT_PASSWORD} ping"]
interval: 2s
retries: 15
start_period: 20s
timeout: 3s
tokenserver-db:
image: docker.io/library/mysql:8.0
volumes:
- tokenserver_db_data:/var/lib/mysql
restart: always
ports:
- "3306"
command: --explicit_defaults_for_timestamp
environment:
#MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_ROOT_PASSWORD: random
MYSQL_DATABASE: tokenserver
MYSQL_USER: test
MYSQL_PASSWORD: test
healthcheck:
test: ["CMD-SHELL", "mysqladmin -h 127.0.0.1 -P 3306 -uroot -p$${MYSQL_ROOT_PASSWORD} ping"]
interval: 2s
retries: 15
start_period: 20s
timeout: 3s
mock-fxa-server:
image: app:build
restart: "no"
entrypoint: "sh scripts/start_mock_fxa_server.sh"
environment:
MOCK_FXA_SERVER_HOST: 0.0.0.0
MOCK_FXA_SERVER_PORT: 6000
syncserver:
# NOTE: The naming in the rest of this repository has been updated to reflect the fact
# that Syncstorage and Tokenserver are now part of one repository/server called
# "Syncserver" (updated from "syncstorage-rs"). We keep the legacy naming below for
# backwards compatibility with previous Docker images.
image: ${SYNCSTORAGE_RS_IMAGE:-syncstorage-rs:latest}
restart: always
ports:
- "8000:8000"
depends_on:
sync-db:
condition: service_healthy
tokenserver-db:
condition: service_healthy
environment:
SYNC_HOST: 0.0.0.0
SYNC_MASTER_SECRET: secret0
SYNC_SYNCSTORAGE__DATABASE_URL: mysql://test:test@sync-db:3306/syncstorage
SYNC_TOKENSERVER__DATABASE_URL: mysql://test:test@tokenserver-db:3306/tokenserver
SYNC_TOKENSERVER__NODE_TYPE: mysql
SYNC_TOKENSERVER__RUN_MIGRATIONS: "true"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/__heartbeat__ || exit 1"]
interval: 2s
retries: 5
start_period: 30s
timeout: 3s
volumes:
sync_db_data:
tokenserver_db_data: