From c02f533f36576051c488bd8cc9e5120a5c706841 Mon Sep 17 00:00:00 2001 From: Varakh Date: Tue, 9 Nov 2021 17:43:24 +0100 Subject: [PATCH] Change to 8080 as default exposed port. Add documentation for podman #4 --- README.md | 13 ++++++++++--- docker-compose.yml | 4 +++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e3c73c8..b28462c 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ or [Docker Hub](https://hub.docker.com/r/varakh/filebin). ## Getting started -The recommended way to get started is to use the example `docker-compose.yml` file and make yourself familiar with the -environment variables which can be set. Defaults should do as a starting point. +The recommended way to get started is to use the example `docker-compose.yml` file and use *Docker*. Before, make +yourself familiar with the environment variables which can be set. Defaults should do as a starting point. _Be sure to read persisting volumes_ section and execute the required command. @@ -24,6 +24,13 @@ docker exec -it filebin_app /bin/sh php /var/www/index.php user add_user ``` +_Alternatively_ you can also use *Podman* for a root-less deployment, e.g. with something similar to: + +``` +podman run -e POSTGRES_PASSWORD=fb -e POSTGRES_USER=fb -e POSTGRES_DB=fb -p 5432:5432 docker.io/postgres:11 +podman run -e BASE_URL=http://localhost:8080 -e DB_HOST=your_host -e DB_PORT=5432 -e DB_NAME=fb -e DB_USER=fb -e DB_PASS=fb -e ENCRYPTION_KEY=your_32_long_secret -p 8080:80 docker.io/varakh/filebin:latest +``` + ### Persisting volumes You'll probably want the `uploads/` folder to be persistent across container restarts. @@ -81,7 +88,7 @@ An example nginx configuration might look like the following. ``` upstream filebin { - server 127.0.0.1:181; + server 127.0.0.1:8080; } server { diff --git a/docker-compose.yml b/docker-compose.yml index 3f1465a..50ef8e7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,8 +21,10 @@ services: app: image: varakh/filebin:latest container_name: filebin_app + depends_on: + - db ports: - - 127.0.0.1:181:80 # exposed port :80 mapped to :181 on only this host. 181 should then be used in proxy + - 127.0.0.1:8080:80 # exposed port :80 mapped to :8080 on only this host. 8080 should then be used in proxy environment: - BASE_URL=https://fb.domain.tld/ # with trailing slash - DB_HOST=db