-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathcompose.yaml
More file actions
90 lines (85 loc) · 2.33 KB
/
Copy pathcompose.yaml
File metadata and controls
90 lines (85 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Docker Compose file to start all database management systems supported by Toasty.
# This makes it easier to run the tests locally, so long as you have Docker installed.
#
# Start with:
# ```
# docker compose up
# ```
#
# Environment variables for running tests:
#
# TOASTY_TEST_MYSQL_URL = "mysql://toasty:toasty@localhost:3306/toasty"
# TOASTY_TEST_POSTGRES_URL = "postgresql://toasty:toasty@localhost:5432/toasty"
# TOASTY_TEST_POSTGRES_TLS_URL = "postgresql://toasty:toasty@localhost:5433/toasty"
# TOASTY_TEST_DYNAMODB_URL = "dynamodb://localhost:8000"
#
# # DynamoDB specific environment variables
# AWS_REGION = "foo"
# AWS_EC2_METADATA_DISABLED="true"
name: toasty
version: "3.8"
services:
dynamodb:
image: amazon/dynamodb-local:latest
command: -jar DynamoDBLocal.jar -port 8000 -inMemory
ports:
- "8000:8000"
mysql:
image: mysql:26
environment:
MYSQL_ROOT_PASSWORD: toasty_root_password
MYSQL_USER: toasty
MYSQL_PASSWORD: toasty
MYSQL_DATABASE: toasty
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
postgresql:
image: postgres:18
environment:
POSTGRES_USER: toasty
POSTGRES_PASSWORD: toasty
POSTGRES_DB: toasty
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "toasty"]
interval: 10s
timeout: 5s
retries: 5
postgresql-tls:
image: postgres:18
environment:
POSTGRES_USER: toasty
POSTGRES_PASSWORD: toasty
POSTGRES_DB: toasty
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
ports:
- "5433:5432"
volumes:
- ./tests/tls/certs:/certs:ro
- ./tests/tls/pg_hba.conf:/etc/pg_hba.conf:ro
- ./tests/tls/setup-ssl.sh:/usr/local/bin/setup-ssl.sh:ro
entrypoint: ["/usr/local/bin/setup-ssl.sh"]
command:
- postgres
- -c
- ssl=on
- -c
- ssl_cert_file=/var/lib/postgresql/server.crt
- -c
- ssl_key_file=/var/lib/postgresql/server.key
- -c
- ssl_ca_file=/var/lib/postgresql/ca.crt
- -c
- hba_file=/var/lib/postgresql/pg_hba.conf
healthcheck:
test: ["CMD", "pg_isready", "-U", "toasty"]
interval: 10s
timeout: 5s
retries: 5