mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-13 19:22:05 +00:00
Add docker compose setup
This commit is contained in:
parent
2a62e6df90
commit
aa5d4a1850
4 changed files with 57 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -19,3 +19,5 @@ www/js/cytube-google-drive.meta.js
|
||||||
www/js/player.js
|
www/js/player.js
|
||||||
tor-exit-list.json
|
tor-exit-list.json
|
||||||
*.patch
|
*.patch
|
||||||
|
mysql/
|
||||||
|
peertube-hosts.json
|
||||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
FROM node:20
|
||||||
|
|
||||||
|
RUN apt update && apt install -y build-essential git wget
|
||||||
|
|
||||||
|
COPY ./ /app
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN rm -rf node_modules lib package-lock.json
|
||||||
|
RUN npm cache clean --force
|
||||||
|
RUN npm install
|
||||||
|
RUN /bin/sh /app/postinstall.sh
|
||||||
|
RUN npm run build-server
|
||||||
|
RUN npm rebuild
|
||||||
|
|
||||||
|
RUN wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
|
||||||
|
RUN chmod a+rx /usr/local/bin/yt-dlp
|
||||||
|
|
||||||
|
CMD ["node", "index.js"]
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
# user: username to authenticate as
|
# user: username to authenticate as
|
||||||
# password: password for user
|
# password: password for user
|
||||||
mysql:
|
mysql:
|
||||||
server: 'localhost'
|
server: 'mysql'
|
||||||
port: 3306
|
port: 3306
|
||||||
database: 'cytube3'
|
database: 'cytube3'
|
||||||
user: 'cytube3'
|
user: 'cytube3'
|
||||||
password: ''
|
password: 'strong-password-here'
|
||||||
pool-size: 10
|
pool-size: 10
|
||||||
|
|
||||||
# Define IPs/ports to listen on
|
# Define IPs/ports to listen on
|
||||||
|
|
|
||||||
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
version: "3.7"
|
||||||
|
services:
|
||||||
|
sync:
|
||||||
|
build: .
|
||||||
|
depends_on:
|
||||||
|
mysql:
|
||||||
|
condition: service_healthy
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
- "1337:1337"
|
||||||
|
- "8443:8443"
|
||||||
|
volumes:
|
||||||
|
- "./templates/head.pug:/app/templates/head.pug"
|
||||||
|
- "./favicon.ico:/app/www/favicon.ico"
|
||||||
|
- "./config.yaml:/app/config.yaml"
|
||||||
|
mysql:
|
||||||
|
image: docker.io/library/mariadb:latest
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mariadb-admin","ping","-h","localhost", "-u", "root", "--password=sync"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 100
|
||||||
|
environment:
|
||||||
|
- MARIADB_AUTO_UPGRADE=1
|
||||||
|
- MARIADB_ROOT_PASSWORD=sync
|
||||||
|
- MARIADB_DATABASE=cytube3
|
||||||
|
- MARIADB_USER=cytube3
|
||||||
|
- MARIADB_PASSWORD=strong-password-here
|
||||||
|
volumes:
|
||||||
|
# This will create and mount the mysql files in the same folder as the docker-compose.yml file.
|
||||||
|
# You can change this to be anywhere.
|
||||||
|
# This will provide data persistence to your MariaDB database.
|
||||||
|
- "./mysql:/var/lib/mysql"
|
||||||
|
# If you are using a reverse proxy please do not forget to add the network here as well.
|
||||||
|
# Refer to the Readme for more information regarding using a Reverse Proxy.
|
||||||
Loading…
Add table
Reference in a new issue