added subdomains

main
leonnicolas 4 years ago
parent 2dd58eba64
commit 240b7a8e8b
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -4,10 +4,10 @@ Deploy all services with docker-compose
## Usage
### Proxy and tls
Set your email address in the docker compose to get let's encrypt tls certificates or delete that service and use your own nging configuration. In that case you can look at ./conf.d/nginx.conf to see the proxy configuration.
Set your email address in the docker compose and replace _DOMAIN_NAME_ with you public domain, where you want to deploy the flotte db project, to get let's encrypt tls certificates or delete that service and use your own nginx configuration. In that case you can look at ./conf.d/nginx.conf to see the proxy configuration.
### Postgres
The postgres db is initiated with the init-user.sh to create users for the user server and the api server. Change the passwords and/or user names. To that also in the docker compose.
The postgres db is initiated with the init-user.sh to create users for the user server and the api server. Change the passwords and/or user names. Do that also in the docker compose.
### Start the services
```bash

@ -0,0 +1,2 @@
api.DOMAIN_NAME
userserver.DOMAIN_NAME

@ -1,19 +1,33 @@
server {
listen 443 ssl;
server_name SERVERNAME
ssl_certificate /etc/letsencrypt/live/flotte.duckdns.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/flotte.duckdns.org/privkey.pem;
server_name DOMAIN_NAME;
ssl_certificate /etc/letsencrypt/live/DOMAIN_NAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/DOMAIN_NAME/privkey.pem;
location /user-management {
rewrite /user-management(.*)$ $1 break;
proxy_pass http://user-management:8080;
}
location = /graphql {
proxy_pass http://api-server:4000;
}
location / {
proxy_pass http://frontend:8080;
}
}
server {
listen 443 ssl;
server_name api.DOMAIN_NAME;
ssl_certificate /etc/letsencrypt/live/api.DOMAIN_NAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.DOMAIN_NAME/privkey.pem;
location / {
proxy_pass http://api-server:4000/graphql;
}
}
server {
listen 443 ssl;
server_name userserver.DOMAIN_NAME;
ssl_certificate /etc/letsencrypt/live/userserver.DOMAIN_NAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/userserver.DOMAIN_NAME/privkey.pem;
location / {
proxy_pass http://user-management:8080;
}
}

@ -38,7 +38,7 @@ services:
ports:
- "8081:8080"
proxy:
image: staticfloat/nginx-certbot
image: staticfloat/nginx-certbot:v1.1
links:
- "frontend:frontend"
- "api-server:api-server"

Loading…
Cancel
Save