forked from jackc/pgx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
145 lines (134 loc) · 6.22 KB
/
docker-compose.yml
File metadata and controls
145 lines (134 loc) · 6.22 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
volumes:
postgres-14-data:
postgres-15-data:
postgres-16-data:
postgres-17-data:
postgres-18-data:
pg-sockets:
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../..:/workspaces:cached
- pg-sockets:/var/run/postgresql
environment:
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: pgx_test
PGHOST: localhost
PGCLIENTENCODING: utf8
# PGX test env vars target PG18 (port 5432) by default.
# test.sh overrides these per-target.
PGX_TEST_DATABASE: "host=localhost port=5432 user=postgres password=postgres dbname=pgx_test"
PGX_TEST_UNIX_SOCKET_CONN_STRING: "host=/var/run/postgresql port=5432 user=postgres dbname=pgx_test"
PGX_TEST_TCP_CONN_STRING: "host=127.0.0.1 port=5432 user=pgx_md5 password=secret dbname=pgx_test"
PGX_TEST_MD5_PASSWORD_CONN_STRING: "host=127.0.0.1 port=5432 user=pgx_md5 password=secret dbname=pgx_test"
PGX_TEST_SCRAM_PASSWORD_CONN_STRING: "host=localhost port=5432 user=pgx_scram password=secret dbname=pgx_test channel_binding=disable"
PGX_TEST_SCRAM_PLUS_CONN_STRING: "host=127.0.0.1 port=5432 user=pgx_ssl password=secret sslmode=verify-full sslrootcert=/tmp/ca.pem dbname=pgx_test channel_binding=require"
PGX_TEST_PLAIN_PASSWORD_CONN_STRING: "host=127.0.0.1 port=5432 user=pgx_pw password=secret dbname=pgx_test"
PGX_TEST_TLS_CONN_STRING: "host=localhost port=5432 user=pgx_ssl password=secret sslmode=verify-full sslrootcert=/tmp/ca.pem dbname=pgx_test channel_binding=disable"
PGX_TEST_TLS_CLIENT_CONN_STRING: "host=localhost port=5432 user=pgx_sslcert sslmode=verify-full sslrootcert=/tmp/ca.pem sslcert=/tmp/pgx_sslcert.crt sslkey=/tmp/pgx_sslcert.key dbname=pgx_test"
PGX_SSL_PASSWORD: certpw
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
postgres-14:
image: postgres:14
restart: unless-stopped
volumes:
- postgres-14-data:/var/lib/postgresql
- ../testsetup/postgresql_setup.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
- ../testsetup/pg_ssl_init.sh:/docker-entrypoint-initdb.d/02-ssl-init.sh:ro
- ../testsetup/pg_hba_devcontainer.conf:/etc/postgresql/pg_hba.conf:ro
- ../testsetup/certs:/etc/postgresql/ssl:ro
- ../testsetup/postgresql_ssl.conf:/etc/postgresql/postgresql_ssl.conf:ro
- pg-sockets:/var/run/postgresql
network_mode: service:app
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pgx_test
POSTGRES_HOSTNAME: localhost
PGPORT: 5414
command: postgres -c port=5414 -c hba_file=/etc/postgresql/pg_hba.conf -c unix_socket_directories=/var/run/postgresql
postgres-15:
image: postgres:15
restart: unless-stopped
volumes:
- postgres-15-data:/var/lib/postgresql
- ../testsetup/postgresql_setup.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
- ../testsetup/pg_ssl_init.sh:/docker-entrypoint-initdb.d/02-ssl-init.sh:ro
- ../testsetup/pg_hba_devcontainer.conf:/etc/postgresql/pg_hba.conf:ro
- ../testsetup/certs:/etc/postgresql/ssl:ro
- ../testsetup/postgresql_ssl.conf:/etc/postgresql/postgresql_ssl.conf:ro
- pg-sockets:/var/run/postgresql
network_mode: service:app
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pgx_test
POSTGRES_HOSTNAME: localhost
PGPORT: 5415
command: postgres -c port=5415 -c hba_file=/etc/postgresql/pg_hba.conf -c unix_socket_directories=/var/run/postgresql
postgres-16:
image: postgres:16
restart: unless-stopped
volumes:
- postgres-16-data:/var/lib/postgresql
- ../testsetup/postgresql_setup.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
- ../testsetup/pg_ssl_init.sh:/docker-entrypoint-initdb.d/02-ssl-init.sh:ro
- ../testsetup/pg_hba_devcontainer.conf:/etc/postgresql/pg_hba.conf:ro
- ../testsetup/certs:/etc/postgresql/ssl:ro
- ../testsetup/postgresql_ssl.conf:/etc/postgresql/postgresql_ssl.conf:ro
- pg-sockets:/var/run/postgresql
network_mode: service:app
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pgx_test
POSTGRES_HOSTNAME: localhost
PGPORT: 5416
command: postgres -c port=5416 -c hba_file=/etc/postgresql/pg_hba.conf -c unix_socket_directories=/var/run/postgresql
postgres-17:
image: postgres:17
restart: unless-stopped
volumes:
- postgres-17-data:/var/lib/postgresql
- ../testsetup/postgresql_setup.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
- ../testsetup/pg_ssl_init.sh:/docker-entrypoint-initdb.d/02-ssl-init.sh:ro
- ../testsetup/pg_hba_devcontainer.conf:/etc/postgresql/pg_hba.conf:ro
- ../testsetup/certs:/etc/postgresql/ssl:ro
- ../testsetup/postgresql_ssl.conf:/etc/postgresql/postgresql_ssl.conf:ro
- pg-sockets:/var/run/postgresql
network_mode: service:app
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pgx_test
POSTGRES_HOSTNAME: localhost
PGPORT: 5417
command: postgres -c port=5417 -c hba_file=/etc/postgresql/pg_hba.conf -c unix_socket_directories=/var/run/postgresql
postgres-18:
image: postgres:18
restart: unless-stopped
volumes:
- postgres-18-data:/var/lib/postgresql
- ../testsetup/postgresql_setup.sql:/docker-entrypoint-initdb.d/01-setup.sql:ro
- ../testsetup/pg_ssl_init.sh:/docker-entrypoint-initdb.d/02-ssl-init.sh:ro
- ../testsetup/pg_hba_devcontainer.conf:/etc/postgresql/pg_hba.conf:ro
- ../testsetup/certs:/etc/postgresql/ssl:ro
- ../testsetup/postgresql_ssl.conf:/etc/postgresql/postgresql_ssl.conf:ro
- pg-sockets:/var/run/postgresql
network_mode: service:app
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pgx_test
POSTGRES_HOSTNAME: localhost
command: postgres -c hba_file=/etc/postgresql/pg_hba.conf -c unix_socket_directories=/var/run/postgresql
cockroachdb:
image: cockroachdb/cockroach:v25.4.4
restart: unless-stopped
network_mode: service:app
command: start-single-node --insecure --listen-addr=127.0.0.1:26257 --store=type=mem,size=1024MiB