|
1 | 1 | <br>
|
2 | 2 |
|
3 | 3 | <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"> |
6 | 6 | </div>
|
7 | 7 |
|
8 | 8 |
|
| 9 | + |
9 | 10 | <br>
|
10 | 11 |
|
11 | 12 | <br>
|
@@ -51,4 +52,109 @@ This repository configures Traefik to run together with, installed in system, dn
|
51 | 52 | * Can be installed and configured automatically via our own [ansible-role-dnsmasq](https://github.com/wayofdev/ansible-role-dnsmasq)
|
52 | 53 |
|
53 | 54 | <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 | + |
| 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 | +[](./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> |
0 commit comments