Add files

This commit is contained in:
BBaoVanC 2021-08-19 15:27:27 -05:00
parent 1e0a6cc01d
commit 54b6ada7dc
3 changed files with 76 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env
data/

40
docker-compose.yml Normal file
View File

@ -0,0 +1,40 @@
version: '3'
services:
postgres:
image: postgres:latest
environment:
- POSTGRES_USER=peertube
- POSTGRES_PASSWORD
- POSTGRES_DB=peertube_prod
volumes:
- ./data/postgres:/var/lib/postgresql/data/
- ./data/progs:/progs
restart: always
healthcheck:
test: pg_isready -U peertube -d peertube_prod
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
peertube:
image: chocobozzz/peertube:v3.2.1-buster
restart: always
ports:
- 127.0.0.1:1935:1935
- 127.0.0.1:9000:9000
volumes:
#- ./data/assets:/app/client/dist
- ./data/peertube/data:/data
- ./data/peertube/conf:/config
depends_on:
- postgres
- redis

34
manage.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
case "$1" in
echo)
shift
echo $@
;;
logs)
shift
docker-compose logs -f --tail=0
;;
postgres)
shift
case "$1" in
bash)
docker-compose exec postgres bash
;;
*)
echo "You have to choose a subcommand too, dummy."
;;
esac
;;
psql)
shift
docker-compose exec postgres psql -U peertube -d peertube_prod $@
;;
*)
echo "You have to choose a command, dummy."
;;
esac