Skip to content

Commit 12c6fb7

Browse files
committed
docs: adding more friendly quick-start guide
1 parent 65b85e0 commit 12c6fb7

File tree

2 files changed

+55
-7
lines changed

2 files changed

+55
-7
lines changed

.env.example

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1+
#
12
# SS = Shared Services
23
# https://docs.docker.com/compose/reference/envvars/#compose_project_name
4+
#
35
COMPOSE_PROJECT_NAME=ss
46

7+
#
58
# Domain, under which default, shared services will run.
69
# Default: .wod
710
# Example subdomains, under which services will run under:
811
# - pg-admin.wod.docker
912
# - router.wod.docker
1013
# - ui.wod.docker
11-
# Can be left blank, but then $TLS_DOMAINS need to contain all top level domains
14+
# Can be left blank, but then $TLS_DOMAINS need to contain all top level domains of your projects.
15+
#
1216
# Example:
17+
# Using empty SHARED_DOMAIN_SEGMENT=""
1318
# TLS_DOMAINS="pg-admin.docker router.docker ui.docker"
19+
# Using custom SHARED_DOMAIN_SEGMENT=".wod"
20+
# TLS_DOMAINS="pg-admin.wod.docker router.wod.docker ui.wod.docker"
21+
#
1422
SHARED_DOMAIN_SEGMENT=
1523

24+
#
1625
# Specify domains for mkcert
1726
# Because of browser limitations, each top-level domain should be added separately.
1827
# This ensures that certificates are correctly recognized by browsers.
@@ -47,6 +56,9 @@ TLS_DOMAINS="ui.docker router.docker pg-admin.docker *.wod.docker *.tpl.wod.dock
4756
# For more information, see:
4857
# https://github.com/DrPsychick/docker-dnsmasq
4958
#
59+
# Note: To use, for example .mac domain, you need to change
60+
# DMQ_GLOBAL=address=/docker/127.0.0.1 (to =>) DMQ_GLOBAL=address=/mac/127.0.0.1
61+
#
5062
DMQ_DHCP_DNS=dhcp-option=6,172.17.10.1,8.8.8.8,8.8.4.4
5163
DMQ_DHCP_GATEWAY=dhcp-option=3,172.17.10.1
5264
DMQ_DHCP_PXE=

README.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,59 @@ If you **like/use** this project, please consider ⭐️ **starring** it. Thanks
7777

7878
<br>
7979

80-
## ⚙️ Configuration
80+
## 🚀 Quick Start (macOS)
8181

82-
### → Cloning and setting up envs
82+
1. Install Homebrew (**optional** if not installed):
8383

84-
1. Clone repository:
84+
```bash
85+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
86+
```
87+
88+
2. **Install `mkcert` and `nss`:**
89+
90+
`mkcert` is a tool that creates locally-trusted development certificates, `nss` provides support of mkcert certificates in macOS.
8591

8692
```bash
87-
git clone git@github.com:wayofdev/docker-shared-services.git
93+
brew install mkcert nss
8894
```
8995

90-
2. Generate default .env file:
96+
3. **Create shared projects Directory:**
97+
98+
This repository should be run once per machine, so let's create a shared directory for this project:
99+
100+
```bash
101+
mkdir -p ~/projects/infra && cd ~/projects/infra
102+
```
103+
104+
4. **Clone this repository:**
105+
106+
```bash
107+
git clone \
108+
git@github.com:wayofdev/docker-shared-services.git \
109+
~/projects/infra/docker-shared-services && \
110+
cd ~/projects/infra/docker-shared-services
111+
```
112+
113+
5. **Create `.env` file:**
114+
115+
Generate a default `.env` file, which contains configuration settings for the project.
91116

92117
```bash
93118
make env
94119
```
95120

96-
Edit the created `.env` file if necessary. You may want to change the default domain.
121+
Open this file and read the notes inside to make any necessary changes to fit your setup.
122+
123+
6. **Install root certificate** and generate default project certs:
124+
125+
This step installs the root certificate into your system's trust store and generates default SSL certificates for your local domains, which are listed in the `.env` file, under variable `TLS_DOMAINS`.
126+
127+
```bash
128+
make cert-install
129+
```
130+
131+
Currently, on macOS you may need to enter password several times to allow mkcert to install root certificate.
132+
This is a one-time operation and details can be found in this upstream [issue](https://github.com/FiloSottile/mkcert/issues/415).
97133

98134
<br>
99135

0 commit comments

Comments
 (0)