Skip to content

Commit

Permalink
v1.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina authored Dec 7, 2022
1 parent 7180dad commit 705a7e6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## v1.6.3
## v1.6.5
update.ubuntu.shで`docker image prune`するように

## v1.6.4
update.ubuntu.shでユーザーの切り替えに失敗するのを修正(sudo -uの代わりにsudo -iuを使うように)

## v1.6.3
Expand Down
9 changes: 6 additions & 3 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,14 @@ export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
# プロセス一覧を表示
docker ps
# ビルド (リポジトリ: local/misskey:latest)
docker build -t local/misskey:latest ./misskey
# docker run
docker run -d -p 3000:3000 --add-host=docker_host:10.0.0.1 -v /home/misskey/misskey/files:/misskey/files -v "/home/misskey/misskey/.config/default.yml":/misskey/.config/default.yml:ro --restart unless-stopped -t "local/misskey:latest"
# ログを表示
docker logs --tail 50 -f コンテナID
# ビルド (local/misskey:latest)
docker build -t local/misskey:latest .
```

ワンライナーなら次のようにします。
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,14 @@ export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
# プロセス一覧を表示
docker ps
# ビルド (リポジトリ: local/misskey:latest)
docker build -t local/misskey:latest ./misskey
# docker run
docker run -d -p 3000:3000 --add-host=docker_host:10.0.0.1 -v /home/misskey/misskey/files:/misskey/files -v "/home/misskey/misskey/.config/default.yml":/misskey/.config/default.yml:ro --restart unless-stopped -t "local/misskey:latest"
# ログを表示
docker logs --tail 50 -f コンテナID
# ビルド (local/misskey:latest)
docker build -t local/misskey:latest .
```

ワンライナーなら次のようにします。
Expand Down
2 changes: 1 addition & 1 deletion ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
version="1.6.4";
version="1.6.5";

tput setaf 4;
echo "";
Expand Down
13 changes: 9 additions & 4 deletions update.ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
version="1.6.4";
version="1.6.5";

tput setaf 2;
echo "Check: root user;";
Expand Down Expand Up @@ -155,15 +155,20 @@ else
sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker pull "$docker_repository";
fi

tput setaf 3;
echo "Process: docker run;";
tput setaf 7;
docker_new_container=$(sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker run -d -p $misskey_port:$misskey_port --add-host=$misskey_localhost:$docker_host_ip -v /home/$misskey_user/$misskey_directory/files:/misskey/files -v "/home/$misskey_user/$misskey_directory/.config/default.yml":/misskey/.config/default.yml:ro --restart unless-stopped -t "$docker_repository");

tput setaf 3;
echo "Process: docker rm container;";
tput setaf 7;
sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker rm -f "$docker_container";

tput setaf 3;
echo "Process: docker run;";
echo "Process: docker image prune;";
tput setaf 7;
docker_container=$(sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker run -d -p $misskey_port:$misskey_port --add-host=$misskey_localhost:$docker_host_ip -v /home/$misskey_user/$misskey_directory/files:/misskey/files -v "/home/$misskey_user/$misskey_directory/.config/default.yml":/misskey/.config/default.yml:ro --restart unless-stopped -t "$docker_repository");
sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker image prune -f;

su "$misskey_user" <<-MKEOF
set -eu;
Expand All @@ -181,7 +186,7 @@ else
misskey_localhost="$misskey_localhost"
docker_host_ip=$docker_host_ip
docker_repository="$docker_repository"
docker_container="$docker_container"
docker_container="$docker_new_container"
version="$version"
_EOF
MKEOF
Expand Down

0 comments on commit 705a7e6

Please sign in to comment.