diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..784880d --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +release-all: + make -C ./nginx release + make -C ./server/ip_register release + make -C ./server/api release diff --git a/README.md b/README.md index ee8bb56..ab5b653 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,12 @@ ### branch管理 当面はmainを基本ブランチとし、mainブランチに対してPull Requestを立てる。 -開発時のブランチ名はIssue番号を用いて`feature/#{Issue番号}`とする。 \ No newline at end of file +開発時のブランチ名はIssue番号を用いて`feature/#{Issue番号}`とする。 + +## リリース方法 + +`Makefile`に全機能のリリースコマンドが記載されており、以下で全機能を更新することができる。 + +``` +make release-all +``` \ No newline at end of file diff --git a/database/ddl.sql b/database/ddl.sql index b098265..d5372ef 100644 --- a/database/ddl.sql +++ b/database/ddl.sql @@ -4,8 +4,8 @@ create table ipv4_history ( id serial, ipv4_address varchar(15) not null, effective_flg boolean not null, + last_checked_at timestamptz not null, created_at timestamptz not null, updated_at timestamptz not null, - last_checked_at timestamptz not null, PRIMARY KEY (id) ); \ No newline at end of file diff --git a/database/dml.sql b/database/dml.sql index 3024f86..2fc705a 100644 --- a/database/dml.sql +++ b/database/dml.sql @@ -5,9 +5,8 @@ insert into id, ipv4_address, effective_flg, - created_at, + last_checked_at created_at, updated_at, - last_checked_at ) values ( @@ -15,8 +14,7 @@ values '111.111.111.111', false, '2022-01-01 00:00:00Z', - '2022-01-01 00:00:00Z', - '2022-01-01 00:00:00Z' + '2022-01-01 00:00:00Z' '2022-01-01 00:00:00Z', ), ( 2, diff --git a/nginx/reverse_proxy.conf b/nginx/reverse_proxy.conf index 7ec787e..60faee6 100644 --- a/nginx/reverse_proxy.conf +++ b/nginx/reverse_proxy.conf @@ -11,14 +11,17 @@ server { ssl_certificate /etc/letsencrypt/live/modockey.mydns.jp/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/modockey.mydns.jp/privkey.pem; - location /home-management/api/v1/ { + # server/api下のAPI + location /pi-home/api/v1/ { proxy_pass http://localhost:50001/v1/; proxy_redirect off; } - location /home-management/ { + # React + location /pi-home/ { proxy_pass http://localhost:50080/; proxy_redirect off; } + #pukiwikiに飛ばす location / { proxy_pass http://localhost:58080/; proxy_redirect off; diff --git a/server/api/Makefile b/server/api/Makefile index 5bf5fac..8abf19f 100644 --- a/server/api/Makefile +++ b/server/api/Makefile @@ -14,7 +14,7 @@ release-systemd: release: release-build release-systemd systemctl stop home-management-api.service - sudo systemctl daemon-reload + sudo systemctl daemon-reload sudo mkdir -p /usr/local/bin/home-management-api sudo cp ./target/release/openapi_client /usr/local/bin/home-management-api/ systemctl start home-management-api.service