forked from mkaczanowski/pastebin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,12 @@ | ||
version: "3.7" | ||
|
||
services: | ||
pastebin: | ||
image: mkaczanowski/pastebin:latest | ||
image: local/pastebin | ||
build: | ||
context: . | ||
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" | ||
- "127.0.0.1:8000:8000" | ||
volumes: | ||
- ./db:/var/lib/pastebin/ | ||
|
||
nginx: | ||
image: "nginx" | ||
ports: | ||
- "80:80" | ||
links: | ||
- pastebin:pastebin | ||
command: | | ||
bash -c "bash -s <<'EOF' | ||
cat > /etc/nginx/nginx.conf <<'EON' | ||
daemon off; | ||
error_log /dev/stderr info; | ||
events { | ||
worker_connections 768; | ||
} | ||
http { | ||
map $$sent_http_content_type $$expires { | ||
default off; | ||
text/css 30d; | ||
application/javascript 30d; | ||
image/x-icon 30d; | ||
} | ||
server { | ||
listen 80; | ||
server_name 0.0.0.0; | ||
gzip on; | ||
gzip_types text/plain application/xml text/css application/javascript; | ||
expires $$expires; | ||
location / { | ||
proxy_pass http://pastebin:8081; | ||
} | ||
access_log /dev/stdout; | ||
} | ||
} | ||
EON | ||
set -eux | ||
cat /etc/nginx/nginx.conf | ||
nginx | ||
EOF" | ||
- /var/lib/pastebin.db:/pastebin.db | ||
command: --ui-line-numbers --address 0.0.0.0 --uri ${URI} |