1
0
Fork 1
mirror of https://example.com synced 2024-11-22 11:16:38 +09:00

dev: track dev directory

This commit is contained in:
naskya 2024-01-15 23:37:30 +09:00
parent 4b401e189f
commit 5b949cac28
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
4 changed files with 37 additions and 32 deletions

5
.gitignore vendored
View file

@ -28,10 +28,7 @@ coverage
!/.config/docker_ci.env
!/.config/helm_values_example.yml
!/.config/LICENSE
docker-compose.yml
# docker dev config
/dev/docker-compose.yml
/docker-compose.yml
# ESLint
.eslintcache

16
dev/Makefile Normal file
View file

@ -0,0 +1,16 @@
.PHONY: recreate
recreate: down up
.PHONY: down
down:
podman-compose down
.PHONY: up
up:
podman-compose up --detach
podman-compose exec db psql \
--user=firefish \
--dbname=firefish_db \
--command='CREATE EXTENSION pgroonga;'

16
dev/docker-compose.yml Normal file
View file

@ -0,0 +1,16 @@
version: "3"
services:
redis:
image: docker.io/redis:7-alpine
ports:
- "6379:6379"
db:
image: docker.io/groonga/pgroonga:latest-alpine-16
environment:
- "POSTGRES_PASSWORD=password"
- "POSTGRES_USER=firefish"
- "POSTGRES_DB=firefish_db"
ports:
- "5432:5432"

View file

@ -18,36 +18,14 @@
- shellcheck
- sea-orm-cli
2. 以下の内容の `dev/docker-compose.yml` を作成する
```yaml
version: "3"
services:
redis:
image: docker.io/redis:7-alpine
ports:
- "6379:6379"
db:
image: docker.io/groonga/pgroonga:latest-alpine-16
environment:
- "POSTGRES_PASSWORD=password"
- "POSTGRES_USER=firefish"
- "POSTGRES_DB=firefish_db"
ports:
- "5432:5432"
```
3. コンテナを起動し、PGroonga を有効化する
2. コンテナを起動し、PGroonga を有効化する
```bash
cd dev
podman-compose up --detach
podman-compose exec db --user=firefish --dbname=firefish_db --command='CREATE EXTENSION pgroonga;'
make up
```
4. 以下の内容の `.config/default.yml` を作成する
3. 以下の内容の `.config/default.yml` を作成する
```yaml
url: http://localhost:3000
@ -67,9 +45,7 @@
```bash
cd dev
podman-compose down --volumes
podman-compose up --detach
podman-compose exec db --user=firefish --dbname=firefish_db --command='CREATE EXTENSION pgroonga;'
make
```
参考にした記事: [Firefish 開発環境の準備(バックエンド向け)](https://hackmd.io/@nmkj-io/HJHNbM_8a)