systems:media_server:set_up_the_docker_environment
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
systems:media_server:set_up_the_docker_environment [2025/06/04 09:41] – peter | systems:media_server:set_up_the_docker_environment [2025/06/05 21:48] (current) – [Create and set permissions for the .env file] peter | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Directory Structure ===== | ===== Directory Structure ===== | ||
- | Setup a specific directory structure so have everything centralized in one place | + | Setup a specific directory structure so have everything centralized in one place: |
- | code bash> | + | <code bash> |
mkdir -p / | mkdir -p / | ||
mkdir -p / | mkdir -p / | ||
Line 12: | Line 12: | ||
mkdir -p / | mkdir -p / | ||
mkdir -p / | mkdir -p / | ||
- | mkdir -p / | ||
</ | </ | ||
Line 24: | Line 23: | ||
* **secrets** - to store credentials used by apps securely. | * **secrets** - to store credentials used by apps securely. | ||
* **shared** - to store shared information. | * **shared** - to store shared information. | ||
- | * **.env** - to store credentials used by apps securely as variable names. | ||
</ | </ | ||
Line 33: | Line 31: | ||
<code bash> | <code bash> | ||
- | sudo chown root:root / | + | sudo chown peter:docker |
sudo chmod 600 / | sudo chmod 600 / | ||
</ | </ | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
</ | </ | ||
Line 48: | Line 46: | ||
<code bash> | <code bash> | ||
touch / | touch / | ||
- | sudo chown root:root / | + | sudo chown peter:docker |
sudo chmod 600 / | sudo chmod 600 / | ||
</ | </ | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
+ | |||
+ | * Setting permissions of the **secrets** directory to 600, makes this directory accessible only to the specified | ||
</ | </ | ||
Line 59: | Line 59: | ||
---- | ---- | ||
- | ===== Create the master | + | ===== Create the mediaserver |
<code bash> | <code bash> | ||
- | touch / | + | touch / |
</ | </ | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
</ | </ | ||
Line 126: | Line 126: | ||
</ | </ | ||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * **PUID** and **PGID** - the user ID and group ID of the Linux user (peter), who we want to run the home server apps as. | ||
+ | * Both of these can be obtained using the **id** command: <code bash> | ||
+ | * **TZ** - the time zone that you want to set for your containers. | ||
+ | * Get your TZ from this [[https:// | ||
+ | * **USERDIR** - the path to the home directory of the current user. | ||
+ | * **DOCKERDIR** - the docker root directory that will house all persistent data folders for docker apps. | ||
+ | * **MEDIADIR1** - the directory that stores the media, downloads, and other stuff. | ||
+ | * This could be an external drive or a network directory. | ||
+ | * **HOSTNAME** - is the name of the docker host. | ||
+ | * To determine the hostname run: <code bash> | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Create the Docker Compose Mediaserver Directory ===== | ||
+ | |||
+ | <code bash> | ||
+ | mkdir / | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * But, the individual Docker Compose files for the apps will be created inside the compose directory. | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== References ===== | ||
+ | https:// |
systems/media_server/set_up_the_docker_environment.1749030093.txt.gz · Last modified: 2025/06/04 09:41 by peter