-
Notifications
You must be signed in to change notification settings - Fork 98
/
docker-compose.yml
57 lines (53 loc) · 1.64 KB
/
docker-compose.yml
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
# You can easily switch between different databases by changing the value of COMPOSE_PROFILES in the .env file.
# possible database connection strings:
# DATABASE_URL='postgres://root:Password123!@localhost/sqlpage'
# DATABASE_URL='mssql://root:Password123!@localhost/sqlpage'
# DATABASE_URL='mysql://root:Password123!@localhost/sqlpage'
services:
web:
build: { context: "." }
ports:
- "8080:8080"
volumes:
- .:/var/www
depends_on:
# mssql: { condition: service_healthy }
[ "${COMPOSE_PROFILES-postgres}" ]
environment:
DATABASE_URL: ${COMPOSE_PROFILES-postgres}://root:Password123!@${COMPOSE_PROFILES:-postgres}/sqlpage${DATABASE_URL_PARAMS:-}
RUST_LOG: sqlpage=trace
postgres:
profiles: ["postgres"]
ports: ["5432:5432"]
build: { context: "db-test-setup/postgres" }
shm_size: 128mb
environment:
POSTGRES_USER: root
POSTGRES_DB: sqlpage
POSTGRES_PASSWORD: Password123!
healthcheck:
test: pg_isready -U root -d sqlpage
mysql:
profiles: ["mysql"]
ports: ["3306:3306"]
image: mysql
environment:
MYSQL_ROOT_PASSWORD: Password123!
MYSQL_DATABASE: sqlpage
mssql:
profiles: ["mssql"]
ports: ["1433:1433"]
build: { context: "db-test-setup/mssql" }
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S localhost -U root -P "Password123!" -Q "SELECT 1" -b -o /dev/null -No
interval: 10s
timeout: 3s
retries: 10
start_period: 10s
mariadb:
profiles: ["mariadb"]
ports: ["3306:3306"]
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: Password123!
MYSQL_DATABASE: sqlpage