Skip to content

Commit 3a2a55f

Browse files
committed
example of running solid-server container behind a nginx proxy
1 parent ff48b40 commit 3a2a55f

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ You will need to have your certificates ready and mount them into the container.
3131

3232
#### Running solid behind nginx proxy
3333

34-
Coming soon...
34+
`./examples/docker-compose.nginx.yml`
35+
36+
Run solid-server on port 8443 behind a nginx proxy on 443. You will need to setup an nginx container with letsencrypt companion [as described here](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion).
3537

3638
#### Other setups
3739

examples/docker-compose.nginx.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This example assumes, that you are running a jwilders/nginx proxy
2+
# with certificate generation by a letsencrypt companion container
3+
# as described here:
4+
#
5+
# https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion/blob/master/docs/Docker-Compose.md
6+
#
7+
# This should provide a docker volume containing the generated certificates.
8+
# We will use the same cert and key as the webproxy for the actual solid server. While it seems to
9+
# work, I am not sure if it is actually a good idea. Please file an issue if you want to discuss this.
10+
11+
# Adjust any line that is commented with (!):
12+
# 1. Change any occurrence of the domain `solid.example` to your actual domain
13+
# 2. Adjust the `latest` tag to a specific version you want to use.
14+
15+
version: '3.7'
16+
services:
17+
server:
18+
image: aveltens/solid-server:latest # (!) use specific version tag here
19+
20+
# this ensures automatic container start, when host reboots
21+
restart: always
22+
23+
expose:
24+
- 8443
25+
26+
volumes:
27+
# mount local directories to the container
28+
# (!) the host directories have to exist and be owned by UID 1000
29+
- /opt/solid/data:/opt/solid/data
30+
- /opt/solid/.db:/opt/solid/.db
31+
- /opt/solid/config:/opt/solid/config
32+
- nginxproxy_certs:/opt/solid/certs
33+
34+
environment:
35+
# (!) use your actual SOLID_SERVER_URI
36+
- "SOLID_SERVER_URI=https://solid.example"
37+
# (!) adjust path to the letsencrypt key and cert
38+
- "SOLID_SSL_KEY=/opt/solid/certs/solid.example/key.pem"
39+
- "SOLID_SSL_CERT=/opt/solid/certs/solid.example/fullchain.pem"
40+
# (!) use your actual host name
41+
- "VIRTUAL_HOST=solid.example"
42+
- "VIRTUAL_PORT=8443"
43+
- "VIRTUAL_PROTO=https"
44+
# (!) use your actual host name
45+
- "LETSENCRYPT_HOST=solid.example"
46+
- "LETSENCRYPT_EMAIL=your@mail.example"
47+
volumes:
48+
# (!) mount certificates from an external volume from your nginx setup
49+
nginxproxy_certs:
50+
external: true

0 commit comments

Comments
 (0)