-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
48 lines (43 loc) · 1.64 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "3"
tasks:
build:
cmds:
# 全てのコンテナをビルド
- docker compose down -v
- docker compose build --build-arg CRYPT_PATH=$(which git-crypt)
# Keycloakのマイグレーション
- docker compose up -d auth
- sleep 20 # wait for keycloak migration
- task auth-export # export keycloak initial data
- docker compose down -v
- task auth-import # import merged data
# DBの変更を適用
- docker compose exec db psql postgres://keycloak:password@db:5432/keycloak -f /sql/init.sql
# Hasura初期構築
- docker compose up -d api
# Next.js初期構築
- docker compose up -d front
- docker compose exec front npm install
- docker compose exec front npm run prepare # for husky
api-export:
cmds:
# APIの変更をエクスポート
- docker compose up -d api
- docker compose exec api hasura metadata export
auth-export:
cmds:
# Keycloakの変更をエクスポート
- docker compose run --rm auth export --file /opt/keycloak/data/export.json
auth-import:
cmds:
# Keycloakの変更をインポート
- docker compose run --entrypoint '' --rm auth /opt/keycloak/merge.sh
- docker compose run --rm auth import --file /opt/keycloak/data/merged.json
# Deploy Commands =============
prod-build:
cmds:
- docker compose -f docker-compose.prod.yml down
# 全てのコンテナをビルド
- docker compose -f docker-compose.prod.yml build --build-arg CRYPT_PATH=$(which git-crypt)
# Next.js初期構築
- docker compose -f docker-compose.prod.yml up -d