feat: add PawSQL docs examples and image CI
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m28s
All checks were successful
Build and Push Image / docker-build-and-push (push) Successful in 2m28s
This commit is contained in:
18
examples/Barkfile
Normal file
18
examples/Barkfile
Normal file
@@ -0,0 +1,18 @@
|
||||
pawsql {
|
||||
listen :5432
|
||||
|
||||
tls {
|
||||
cert /etc/pawsql/tls/fullchain.pem
|
||||
key /etc/pawsql/tls/privkey.pem
|
||||
}
|
||||
|
||||
database bark_bistro {
|
||||
hostname bistro.pawsql.test
|
||||
upstream bark-bistro:5432
|
||||
}
|
||||
|
||||
database wagging_tail {
|
||||
hostname tail.pawsql.test
|
||||
upstream wagging-tail:5432
|
||||
}
|
||||
}
|
||||
49
examples/docker-compose.yml
Normal file
49
examples/docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
services:
|
||||
certificates:
|
||||
image: alpine/openssl:latest
|
||||
command:
|
||||
- sh
|
||||
- -ec
|
||||
- >-
|
||||
openssl req -x509 -newkey rsa:2048 -nodes -days 7
|
||||
-keyout /certs/privkey.pem -out /certs/fullchain.pem
|
||||
-subj /CN=*.pawsql.test
|
||||
volumes:
|
||||
- certificates:/certs
|
||||
|
||||
pawsql:
|
||||
build: ..
|
||||
depends_on:
|
||||
certificates:
|
||||
condition: service_completed_successfully
|
||||
bark-bistro:
|
||||
condition: service_started
|
||||
wagging-tail:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./Barkfile:/etc/pawsql/Barkfile:ro
|
||||
- certificates:/etc/pawsql/tls:ro
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- bistro.pawsql.test
|
||||
- tail.pawsql.test
|
||||
|
||||
bark-bistro:
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_DB: bark_bistro
|
||||
POSTGRES_USER: bark_bistro
|
||||
POSTGRES_PASSWORD: example-only
|
||||
|
||||
wagging-tail:
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_DB: wagging_tail
|
||||
POSTGRES_USER: wagging_tail
|
||||
POSTGRES_PASSWORD: example-only
|
||||
|
||||
volumes:
|
||||
certificates:
|
||||
Reference in New Issue
Block a user