Skip to content

Commit b9745d4

Browse files
committed
docs: updating readme
1 parent ff862e6 commit b9745d4

File tree

5 files changed

+119
-7
lines changed

5 files changed

+119
-7
lines changed

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
-include .env
2-
3-
CURRENT_DIR ?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
1+
export DOCKER_BUILDKIT ?= 1
42
DOCKER_COMPOSE ?= docker-compose
53
BUILDER_IMAGE ?= wayofdev/build-deps:alpine-latest
64

@@ -57,7 +55,7 @@ env: ## Generate .env file from example
5755
cp -f .env.example .env
5856
.PHONY: env
5957

60-
cert-install:
58+
cert-install: ## Run mkcert to install CA into system storage and generate default certs for traefik
6159
mkcert -install
6260
bash mkcert.sh
6361
.PHONY: cert-install

README.md

Lines changed: 109 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<br>
22

33
<div align="center">
4-
<img width="456" src="https://raw.githubusercontent.com/wayofdev/docker-php-base/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only">
5-
<img width="456" src="https://raw.githubusercontent.com/wayofdev/docker-php-base/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only">
4+
<img width="456" src="https://raw.githubusercontent.com/wayofdev/docker-shared-services/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only">
5+
<img width="456" src="https://raw.githubusercontent.com/wayofdev/docker-shared-services/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only">
66
</div>
77

88

9+
910
<br>
1011

1112
<br>
@@ -51,4 +52,109 @@ This repository configures Traefik to run together with, installed in system, dn
5152
* Can be installed and configured automatically via our own [ansible-role-dnsmasq](https://github.com/wayofdev/ansible-role-dnsmasq)
5253

5354
<br>
54-
@todo to be continued...
55+
56+
## ⚙️ How to Use
57+
58+
### → Instructions
59+
60+
1. Download repository:
61+
62+
```bash
63+
$ git clone [email protected]:wayofdev/docker-shared-services.git
64+
```
65+
66+
2. Generate default .env file:
67+
68+
```bash
69+
$ make env
70+
```
71+
72+
Edit created .env file, if it is needed. Probably you will want to change default domain.
73+
74+
Leave blank `SHARED_DOMAIN_SEGMENT`, to run shared services under first level domain, example:
75+
76+
* router.docker,
77+
* pg-admin.docker,
78+
* ui.docker
79+
* etc.
80+
81+
Or set segment, to run them under subdomain: `SHARED_DOMAIN_SEGMENT=".wod"` Services will run under that segment, example:
82+
83+
* router**.wod**.docker
84+
* pg-admin**.wod**.docker
85+
* ui**.wod**.docker
86+
* etc
87+
88+
Don't forget to include first level domains into `TLS_DOMAINS` variable. Default certificates will be created for these domains and wildcards:
89+
90+
* ui.docker — Included as fallback, if `SHARED_DOMAIN_SEGMENT` was left blank
91+
* router.docker — Included as fallback, if `SHARED_DOMAIN_SEGMENT` was left blank
92+
* pg-admin.docker — Included as fallback, if `SHARED_DOMAIN_SEGMENT` was left blank
93+
* *.wod.docker — All subdomains under this wildcard. Only one level of nesting will work in most of the browsers
94+
* *.wod.mac — Same as above wildcard
95+
96+
3. Install root certificate into system and generate default certs:
97+
```bash
98+
$ make cert-install
99+
```
100+
101+
4. (Optional) Enable docker-compose.override file to run extra services, like pg-admin and others:
102+
```bash
103+
$ make override
104+
```
105+
106+
5. Run this repository:
107+
108+
```bash
109+
$ make up
110+
```
111+
112+
<br>
113+
114+
### → Outcome
115+
116+
Services will be running under shared docker network, called `ss_shared_network` and all microservices, that will share same network, will be visible for Traefik, and local DNS, served by dnsmasq, will be available.
117+
118+
**Traefik dashboard**[https://router.wod.docker](https://router.wod.docker/dashboard/#/)
119+
120+
![Alt text](assets/traefik.png?raw=true "Title")
121+
122+
**Portrainer**https://ui.wod.docker
123+
124+
**Pg-admin** (if docker-compose.override was enabled) — https://pg-admin.wod.docker
125+
126+
<br>
127+
128+
## 🧪 Testing
129+
130+
You can check `Makefile` to get full list of commands for local testing. For testing, you can use these commands to test whole role or separate tasks:
131+
132+
Testing docker-compose using dcgoss:
133+
134+
```bash
135+
$ make test
136+
```
137+
138+
<br>
139+
140+
## 🤝 License
141+
142+
[![Licence](https://img.shields.io/github/license/wayofdev/docker-shared-services?style=for-the-badge&color=blue)](./LICENSE)
143+
144+
<br>
145+
146+
## 🙆🏼‍♂️ Author Information
147+
148+
This repository was created in **2022** by [lotyp / wayofdev](https://github.com/wayofdev).
149+
150+
<br>
151+
152+
## 🫡 Contributors
153+
154+
<img align="left" src="https://img.shields.io/github/contributors-anon/wayofdev/docker-shared-services?style=for-the-badge"/>
155+
156+
<a href="https://github.com/wayofdev/docker-nginx/graphs/contributors">
157+
<img src="https://opencollective.com/wod/contributors.svg?width=890&button=false">
158+
</a>
159+
160+
<br>

assets/traefik.png

381 KB
Loading

docker-compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
version: '3.9'
24

35
services:
@@ -47,3 +49,5 @@ networks:
4749

4850
volumes:
4951
ui_data:
52+
53+
...

traefik/conf/traefik.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
providers:
24
docker:
35
exposedByDefault: false
@@ -32,3 +34,5 @@ tls:
3234
defaultCertificate:
3335
certFile: /etc/traefik/cert.pem
3436
keyFile: /etc/traefik/key.pem
37+
38+
...

0 commit comments

Comments
 (0)