feat: Initial commit, no webserver yet.
This commit is contained in:
46
compose.yaml
Normal file
46
compose.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
services:
|
||||||
|
shlink_server:
|
||||||
|
image: shlinkio/shlink:stable
|
||||||
|
container_name: shlink_server
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
- backend
|
||||||
|
ports:
|
||||||
|
- "${SHLINK_PORT}:8080"
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
|
||||||
|
shlink_postgres:
|
||||||
|
image: postgres/postgres:17-alpine
|
||||||
|
container_name: shlink_postgres
|
||||||
|
user: ${DB_USER_UID}:${DB_USER_GID}
|
||||||
|
environment:
|
||||||
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||||
|
POSTGRES_USER: ${DB_USER}
|
||||||
|
POSTGRES_DB: ${DB_NAME}
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
- /etc/passwd:/etc/passwd:ro
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
backend:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs
|
||||||
|
o: "addr=${NFS_ADDR},nolock,soft,rw"
|
||||||
|
device: ${DB_LOCATION}
|
||||||
|
labels:
|
||||||
|
dev.housh.description: "Shlink postgres database volume."
|
||||||
22
example.env
Normal file
22
example.env
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Shlink variables
|
||||||
|
DEFAULT_DOMAIN=l.housh.dev
|
||||||
|
IS_HTTPS_ENABLED=true
|
||||||
|
GEOLITE_LICENSE_KEY="super-secret-key"
|
||||||
|
DB_DRIVER=postgres
|
||||||
|
|
||||||
|
# Database variables
|
||||||
|
DB_HOST=shlink_postgres
|
||||||
|
DB_NAME=shlink
|
||||||
|
DB_USER=shlink
|
||||||
|
DB_PASSWORD="super-secret"
|
||||||
|
DB_PORT=5432
|
||||||
|
# Set these to owner of the database volume.
|
||||||
|
# These also need to be in /etc/passwd of the host for
|
||||||
|
# postgres to startup correctly.
|
||||||
|
DB_USER_UID=1000
|
||||||
|
DB_USER_GID=1000
|
||||||
|
|
||||||
|
# Other custom variables.
|
||||||
|
SHLINK_PORT=8880
|
||||||
|
DB_LOCATION=":/var/nfs/shared/<mnt>"
|
||||||
|
NFS_ADDR=nas.local
|
||||||
Reference in New Issue
Block a user