mirror of
https://example.com
synced 2024-11-22 07:06:38 +09:00
dev: track dev directory
This commit is contained in:
parent
c1e0186e7b
commit
0d8ee4387b
4 changed files with 37 additions and 32 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -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
16
dev/Makefile
Normal 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
16
dev/docker-compose.yml
Normal 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"
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue