diff --git a/.gitignore b/.gitignore index 78e97eb..d2e4820 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ Cargo.lock **/*.rs.bk pastebin.db + +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 48fe8ab..324e836 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,15 @@ -version: "3.7" - services: pastebin: image: mkaczanowski/pastebin:latest container_name: pastebin - volumes: - - $DOCKERDIR/pastebin:/var/lib/pastebin restart: unless-stopped command: --address 0.0.0.0 --port 8081 --uri ${URI} --db=/var/lib/pastebin/ ports: - - "8081:8081" + - "8000:8081" volumes: - ./db:/var/lib/pastebin/ + env_file: + - .env nginx: image: "nginx" diff --git a/static/custom.js b/static/custom.js index 4e2cb3b..ab33725 100644 --- a/static/custom.js +++ b/static/custom.js @@ -1,4 +1,6 @@ $(document).ready(function() { + const uri_prefix = process.env.URI || ""; + function replaceUrlParam(url, param, value) { if (value == null) { value = '';