container: enable pgroonga extension automatically

This commit is contained in:
sup39 2024-01-18 04:36:17 +09:00
parent 43708ead38
commit 127487dc38
Signed by: sup39
GPG key ID: 111C00916C1641E5
4 changed files with 4 additions and 5 deletions

View file

@ -10,8 +10,3 @@ down:
.PHONY: up .PHONY: up
up: up:
podman-compose up --detach podman-compose up --detach
sleep 2
podman-compose exec db psql \
--user=firefish \
--dbname=firefish_db \
--command='CREATE EXTENSION pgroonga;'

View file

@ -14,3 +14,5 @@ services:
- "POSTGRES_DB=firefish_db" - "POSTGRES_DB=firefish_db"
ports: ports:
- "5432:5432" - "5432:5432"
volumes:
- "../neko/pgroonga.sql:/docker-entrypoint-initdb.d/pgroonga.sql:ro"

View file

@ -40,6 +40,7 @@ services:
- .config/docker.env - .config/docker.env
volumes: volumes:
- ./db:/var/lib/postgresql/data - ./db:/var/lib/postgresql/data
- ./neko/pgroonga.sql:/docker-entrypoint-initdb.d/pgroonga.sql:ro
networks: networks:
calcnet: calcnet:

1
neko/pgroonga.sql Normal file
View file

@ -0,0 +1 @@
CREATE EXTENSION pgroonga;