46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
networks:
|
|
fb:
|
|
external: false
|
|
|
|
services:
|
|
db:
|
|
image: postgres:15
|
|
container_name: filebin_db
|
|
environment:
|
|
- POSTGRES_PASSWORD=fb
|
|
- POSTGRES_USER=fb
|
|
- POSTGRES_DB=fb
|
|
volumes:
|
|
# persist postgres data on host in current directory, you can also switch to actual volumes
|
|
- ./filebin_db/:/var/lib/postgresql/data
|
|
restart: always
|
|
networks:
|
|
- fb
|
|
|
|
app:
|
|
image: varakh/filebin:latest
|
|
container_name: filebin_app
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
# exposed port :80 mapped to :8080 on only this host. 8080 should then be used in proxy
|
|
- "127.0.0.1:8080:80"
|
|
environment:
|
|
# with trailing slash
|
|
- BASE_URL=https://fb.domain.tld/
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- DB_NAME=fb
|
|
- DB_USER=fb
|
|
- DB_PASS=fb
|
|
# REQUIRED: set a 32 character long sequence, e.g. with 'openssl rand -hex 16'
|
|
- ENCRYPTION_KEY=
|
|
volumes:
|
|
# persist filebin data on host in current directory, you can also switch to actual volumes
|
|
- "./filebin_data:/var/www/data/uploads"
|
|
stdin_open: true
|
|
tty: true
|
|
restart: always
|
|
networks:
|
|
- fb
|
|
command: sh -c 'sh /wait-for.sh $$DB_HOST:$$DB_PORT -- php /configure.php && exec s6-svscan /etc/s6/'
|