mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 12:41:05 +01:00
Implemented restart procedures
This commit is contained in:
parent
c2df7dbc7e
commit
7db4a5a42f
12
README.md
12
README.md
@ -1,5 +1,6 @@
|
|||||||
# Server-Playbook
|
# Server-Playbook
|
||||||
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
|
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
Ansible script to manage servers.
|
Ansible script to manage servers.
|
||||||
|
|
||||||
@ -13,7 +14,18 @@ The system use the following role namings:
|
|||||||
|docker-|applications which run on docker containers on the system|
|
|docker-|applications which run on docker containers on the system|
|
||||||
|
|
||||||
## Debug
|
## Debug
|
||||||
|
|
||||||
### Cleanup docker
|
### Cleanup docker
|
||||||
``bash
|
``bash
|
||||||
docker stop $(docker ps -aq); docker rm $(docker ps -aq); docker volume rm $(docker volume ls -q);
|
docker stop $(docker ps -aq); docker rm $(docker ps -aq); docker volume rm $(docker volume ls -q);
|
||||||
``
|
``
|
||||||
|
|
||||||
|
### Restart
|
||||||
|
|
||||||
|
To mercifull restart the server and to prevent data lost type in:
|
||||||
|
|
||||||
|
``bash
|
||||||
|
docker stop $(docker ps -a -q) && systemctl stop docker && shutdown -r +2 "The system will shutdown in 2 minutes"
|
||||||
|
``
|
||||||
|
|
||||||
|
May it's neccessary to restart some of the the docker containers manual afterwards.
|
||||||
|
@ -2,7 +2,7 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
env_file: .env
|
env_file: .env
|
||||||
environment:
|
environment:
|
||||||
- "POSTGRES_HOST_AUTH_METHOD=trust"
|
- "POSTGRES_HOST_AUTH_METHOD=trust"
|
||||||
@ -11,14 +11,14 @@ services:
|
|||||||
- database:/var/lib/postgresql/data
|
- database:/var/lib/postgresql/data
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- redis:/data
|
- redis:/data
|
||||||
|
|
||||||
celeryworker:
|
celeryworker:
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
@ -31,7 +31,7 @@ services:
|
|||||||
- "data:${MEDIA_ROOT}"
|
- "data:${MEDIA_ROOT}"
|
||||||
|
|
||||||
celerybeat:
|
celerybeat:
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
@ -40,7 +40,7 @@ services:
|
|||||||
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||||
|
|
||||||
api:
|
api:
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
@ -53,7 +53,7 @@ services:
|
|||||||
- "5000"
|
- "5000"
|
||||||
|
|
||||||
front:
|
front:
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
@ -3,7 +3,7 @@ version: '2'
|
|||||||
services:
|
services:
|
||||||
application:
|
application:
|
||||||
image: zknt/pixelfed
|
image: zknt/pixelfed
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
env_file:
|
env_file:
|
||||||
@ -18,7 +18,7 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
worker:
|
worker:
|
||||||
image: zknt/pixelfed
|
image: zknt/pixelfed
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -6,4 +6,4 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
ports:
|
ports:
|
||||||
- 127.0.0.1:{{http_port}}:8080
|
- 127.0.0.1:{{http_port}}:8080
|
||||||
restart: unless-stopped
|
restart: always
|
Loading…
Reference in New Issue
Block a user