Skip to content

Commit

Permalink
documented (new) conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
ValorNaram committed Jun 26, 2022
1 parent b47b021 commit ea4fe98
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ You can find all in the [root](.) folder. Each module has a README file with mor
This service serves as a reverse proxy which stands in the middle between the client and the modules. It hides most resources modules expose through their HTTP endpoints and only allows access to tose actually needed by clients. This is achieved by a `nginx.conf` each module has. NGINX also handles the SSL encryption stuff for the modules so not each single module need to do that by itself. The use of this module is **mandatory** in production environments.

Concerning background map tiles: Decide wethever you want to use the module *static_maps* or *tileserver*. Using both is useless.

### Add additional modules

You are open to use more modules than those provided here as this structure works for all modules compatible to our conventions. Across our repos you can find additional modules to clone into here. These have a `tsm-` prefix. Download them by doing a clone into this directory. They should have a README telling you how to use them.
5 changes: 3 additions & 2 deletions nginx-dynamic/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
version: '3'
services:
nginx:
nginx: # should be equal to the name of the folder name this compose is in
image: nginx
ports:
- 80:80
- 443:443
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./config/js:/etc/nginx/inc/js:ro
# the name of the folder on the host needs to have the name 'data' and it should contain the files you want to persist between docker container builds.
- ./data/nginx:/etc/nginx/conf.d:ro
- ./data/logs/nginx:/var/log/nginx/:ro
- ./data/certbot/conf:/etc/letsencrypt:ro
Expand All @@ -16,6 +17,6 @@ services:
command: /bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done
& nginx -g "daemon off;"'
restart: unless-stopped
networks:
networks: # this needs to be added as we spin off a default network 'trufi-server' to connect this module to the reverse proxy nginx
default:
name: trufi-server
4 changes: 2 additions & 2 deletions nginx-legacy/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
services:
nginx:
nginx: # should be equal to the name of the folder name this compose is in
image: nginx:1.15-alpine
volumes:
- ./dev/:/etc/nginx/conf.d
ports:
- 8080:80
restart: unless-stopped
networks:
networks: # this needs to be added as we spin off a default network 'trufi-server' to connect this module to the reverse proxy nginx
default:
name: trufi-server
6 changes: 3 additions & 3 deletions otp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
services:
otp:
otp: # should be equal to the name of the folder name this compose is in
build:
context: ./$otpversion
dockerfile: Dockerfile
restart: unless-stopped
volumes:
- ./data:/app/graphs
networks:
- ./data:/app/graphs # the name of the folder on the host needs to have the name 'data' and it should contain the files you want to persist between docker container builds. This makes it easier to add (updated) data generated with https://github.com/trufi-association/trufi-server-resources
networks: # this needs to be added as we spin off a default network 'trufi-server' to connect this module to the reverse proxy nginx
default:
name: trufi-server
6 changes: 3 additions & 3 deletions photon/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
services:
photon:
photon: # should be equal to the name of the folder name this compose is in
build:
context: ./0.3.5
dockerfile: ./Dockerfile
restart: unless-stopped
volumes:
- ./data:/app/photon_data
networks:
- ./data:/app/photon_data # the name of the folder on the host needs to have the name 'data' and it should contain the files you want to persist between docker container builds. This makes it easier to add (updated) data generated with https://github.com/trufi-association/trufi-server-resources
networks: # this needs to be added as we spin off a default network 'trufi-server' to connect this module to the reverse proxy nginx
default:
name: trufi-server
6 changes: 3 additions & 3 deletions static_maps/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3'
services:
static-maps:
static-maps: # should be equal to the name of the folder name this compose is in
image: nginx:1.15-alpine
volumes:
- ./nginx:/etc/nginx/conf.d
- ./data:/var/www/maps
- ./data:/var/www/maps # the name of the folder on the host needs to have the name 'data' and it should contain the files you want to persist between docker container builds. This makes it easier to add (updated) data generated with https://github.com/trufi-association/trufi-server-resources
restart: unless-stopped
networks:
networks: # this needs to be added as we spin off a default network 'trufi-server' to connect this module to the reverse proxy nginx
default:
name: trufi-server
6 changes: 3 additions & 3 deletions tileserver/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
services:
tileserver:
tileserver: # should be equal to the name of the folder name this compose is in
image: maptiler/tileserver-gl
command: --port 80 --config /config/config.json --verbose
volumes:
- ./data:/data
- ./data:/data # the name of the folder on the host needs to have the name 'data' and it should contain the files you want to persist between docker container builds. This makes it easier to add (updated) data generated with https://github.com/trufi-association/trufi-server-resources
- ./config:/config
restart: unless-stopped
networks:
networks: # this needs to be added as we spin off a default network 'trufi-server' to connect this module to the reverse proxy nginx
default:
name: trufi-server

0 comments on commit ea4fe98

Please sign in to comment.