Add files
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					.env
 | 
				
			||||||
 | 
					data/
 | 
				
			||||||
							
								
								
									
										40
									
								
								docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								docker-compose.yml
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										34
									
								
								manage.sh
									
									
									
									
									
										Executable 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
 | 
				
			||||||
		Reference in New Issue
	
	Block a user