Skip to content

Commit

Permalink
Add docker-compose (further simplify docker setup) (#55)
Browse files Browse the repository at this point in the history
* Add docker-compose.yml

Add docker compose to further simplify the setup of the docker project. 

This eliminates the need to specify the need for defining ports and volumes in the command and moves it to the docker-compose file instead.

* Update README.md

Add docker-compose command to documentation

* Update README.md (docker instructions)

Update md formating for docker commands (this enables one-click-copy in the github preview)
  • Loading branch information
4ctiv committed Aug 12, 2024
1 parent 7ee893a commit 097cf61
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ Default channel example: https://synctube.onrender.com/
- Open showed "Local" link for yourself and send "Global" link to friends

### Setup (Docker)
- As alternative, you can install Docker and run:
- `docker build -t synctube .`
- `docker run --rm -it -p 4200:4200 -v ${PWD}/user:/usr/src/app/user synctube`
As alternative, you can install Docker and run:
> ```shell
> docker build -t synctube .
> docker run --rm -it -p 4200:4200 -v ${PWD}/user:/usr/src/app/user synctube
> ```
or
> ```shell
> docker compose up -d
> ```
- (Docker container hides real local/global ips, so you need to checkout it manually)
### Configuration
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Run this as follows: 'docker compose up' (keep running in terminal session, exist via [STRG] + [C])
# or 'docker compose up -d' (keep running in background)
version: "3"
services:
synctube:
build: .
#image: synctube
ports:
- "4200:4200"
volumes:
- "${PWD}/user:/usr/src/app/user"

0 comments on commit 097cf61

Please sign in to comment.