Skip to content

Commit

Permalink
added services script, updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
omeraloni committed Oct 23, 2019
1 parent d02f708 commit bcd0230
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

## Setup
```
# Create required folders and .env file
$ ./init
# Start Docker
$ ./up
```
## Scripts
- `init` - Create required folders and `.env` file (should be run once).
- `services` - list Docker services
- `logs <service>` - show logs of specific service.
- `logs` - show logs of all services.
- `up` - Bring up services.
- `down` - Take down services.
- `login <service>` - Login to specific service.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ services:
- PLEX_CLAIM=${PLEX_CLAIM}
- PLEX_UID=${PUID}
- PLEX_GID=${PGID}
- ADVERTISE_IP="http://{SERVER_ADDR}:32400/"
- ADVERTISE_IP="http://{PLEX_SERVER_ADDR}:32400/"
6 changes: 4 additions & 2 deletions init
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ mkdir -pv $HOME/watch
mkdir -pv $HOME/media/movies
mkdir -pv $HOME/media/tvshows

# Create .env file for docker-compose
echo "PUID=`id -u $USER`" > $DOCKER_ENV
echo "PGID=`getent group docker | awk -F: '{printf $3}'`" >> $DOCKER_ENV
echo "TZ=`cat /etc/timezone`" >> $DOCKER_ENV
echo "USERDIR=`echo $HOME`" >> $DOCKER_ENV
read -p 'Plex server claim (https://www.plex.tv/claim/): ' plex_claim
echo "PLEX_CLAIM=$plex_claim" >> $DOCKER_ENV
echo "SERVER_ADDR=`hostname -I | awk '{print $1}'`" >> $DOCKER_ENV
echo "PLEX_SERVER_ADDR=`hostname -I | awk '{print $1}'`" >> $DOCKER_ENV
echo ""
echo "Created .env file:"
echo "`cat $DOCKER_ENV`"
echo "`awk -F':' '{ print "...", $1 }' $DOCKER_ENV`"
echo ""
echo "Done!"
1 change: 1 addition & 0 deletions services
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-compose config --services

0 comments on commit bcd0230

Please sign in to comment.