-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.4 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.4 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
version: "3.6"
services:
mysqltestdb:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test
restart: unless-stopped
ports:
- "3307:3306"
mariatestdb:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test
restart: unless-stopped
ports:
- "3306:3306"
pgtestdb:
image: postgres:16
environment:
POSTGRES_PASSWORD: password
restart: unless-stopped
volumes:
# Uses a tmpfs volume to make tests extremely fast. The data in test
# databases is not persisted across restarts, nor does it need to be.
- type: tmpfs
target: /var/lib/postgresql/data/
command:
- "postgres"
- "-c" # turn off fsync for speed
- "fsync=off"
# - "-c" # log everything for debugging
# - "log_statement=all"
ports:
# Entirely up to you what port you want to use while testing.
- "5433:5432"
pgweb:
container_name: pgweb
restart: always
image: sosedoff/pgweb
ports:
- "8081:8081"
links:
- pgtestdb:pgtestdb # my database container is called postgres, not db
environment:
- PGWEB_DATABASE_URL=postgres://postgres:password@pgtestdb:5432/postgres?sslmode=disable
depends_on:
- pgtestdb