Skip to content

Commit 7a00760

Browse files
committed
support podman-restart
1 parent 590f118 commit 7a00760

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README_PodmanSetup.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ chmod 666 html/*.json
2525
```bash
2626
podman compose up -d
2727
```
28+
29+
### サーバ再起動時もコンテナを自動起動させる
30+
31+
一般ユーザで以下を実行する
32+
33+
```bash
34+
systemctl --user enable --now podman-restart
35+
```

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
- "11790:7900"
1919
# コンテナが使用するメモリの上限を設定
2020
shm_size: "2gb"
21-
restart: unless-stopped
21+
restart: always
2222

2323
# Web スクレイピングを実行するコンテナ
2424
scraping-app:
@@ -37,7 +37,7 @@ services:
3737
- ./html:/opt/app/html:z
3838
- ./scraping-app/.env:/opt/app/.env:z
3939
tty: true
40-
restart: unless-stopped
40+
restart: always
4141

4242
# RFC翻訳結果を閲覧するためのWebページ
4343
nginx:
@@ -49,7 +49,7 @@ services:
4949
- "11080:80"
5050
volumes:
5151
- ./html:/usr/share/nginx/html:z
52-
restart: unless-stopped
52+
restart: always
5353

5454
# Jenkinsコンテナ
5555
jenkins:
@@ -59,4 +59,4 @@ services:
5959
- "11081:8080"
6060
volumes:
6161
- ./jenkins/jenkins_home:/var/jenkins_home:z
62-
restart: unless-stopped
62+
restart: always

0 commit comments

Comments
 (0)