mirror of
https://example.com
synced 2024-11-22 11:16:38 +09:00
dev: track dev directory
This commit is contained in:
parent
4b401e189f
commit
5b949cac28
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/docker_ci.env
|
||||||
!/.config/helm_values_example.yml
|
!/.config/helm_values_example.yml
|
||||||
!/.config/LICENSE
|
!/.config/LICENSE
|
||||||
docker-compose.yml
|
/docker-compose.yml
|
||||||
|
|
||||||
# docker dev config
|
|
||||||
/dev/docker-compose.yml
|
|
||||||
|
|
||||||
# ESLint
|
# ESLint
|
||||||
.eslintcache
|
.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
|
- shellcheck
|
||||||
- sea-orm-cli
|
- sea-orm-cli
|
||||||
|
|
||||||
2. 以下の内容の `dev/docker-compose.yml` を作成する
|
2. コンテナを起動し、PGroonga を有効化する
|
||||||
|
|
||||||
```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 を有効化する
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd dev
|
cd dev
|
||||||
podman-compose up --detach
|
make up
|
||||||
podman-compose exec db --user=firefish --dbname=firefish_db --command='CREATE EXTENSION pgroonga;'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
4. 以下の内容の `.config/default.yml` を作成する
|
3. 以下の内容の `.config/default.yml` を作成する
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
url: http://localhost:3000
|
url: http://localhost:3000
|
||||||
|
@ -67,9 +45,7 @@
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd dev
|
cd dev
|
||||||
podman-compose down --volumes
|
make
|
||||||
podman-compose up --detach
|
|
||||||
podman-compose exec db --user=firefish --dbname=firefish_db --command='CREATE EXTENSION pgroonga;'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
参考にした記事: [Firefish 開発環境の準備(バックエンド向け)](https://hackmd.io/@nmkj-io/HJHNbM_8a)
|
参考にした記事: [Firefish 開発環境の準備(バックエンド向け)](https://hackmd.io/@nmkj-io/HJHNbM_8a)
|
||||||
|
|
Loading…
Reference in a new issue