Skip to content

Commit

Permalink
upd: minor docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
LeKovr committed Jul 31, 2023
1 parent f2d38c0 commit 7293500
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ docker-compose.yml: $(DC_INC) $(DC_SOURCES)
## Git commands
#:

## run git for every app
## sample: make git-status-s
## run git for every app.
## Sample: make git-status-s
git-%:
@echo "*** $@ ***" ; \
x=$@ ; cmdd=$${x#git-} ; cmd=$${cmdd/-/ -} ; \
Expand All @@ -125,6 +125,7 @@ git-%:
pushd apps/_$$app > /dev/null ; \
git $$cmd ; \
popd > /dev/null ; \
echo "---" ; \
done

# ------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ config-if: config
## Other
#:

## print config var
## make echo-gitea-admin-pass
## print config var.
## Sample: make echo-gitea-admin-pass
echo-%:
@x=$@ ; x1=$${x#echo-} ; x2=$${x1//-/_} ; name=$${x2^^} ; val=$${!name} ; echo "$$name: $$val"

Expand Down
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,11 @@
#### Пример для статического сайта и nginx

```bash
$ git clone https://github.com/dopos/dcape-app-nginx-sample.git
..
$ cd dcape-app-nginx-sample
$ make config-if
... <edit .env>
$ make up
..
Creating mysite-dev-lan_www_1 ... done
git clone https://github.com/dopos/dcape-app-nginx-sample.git
cd dcape-app-nginx-sample
make config-if
# <edit .env>
make up
```

Все готово - `http://mysite.dev.lan/` и `http://www.mysite.dev.lan/` запущены.
Expand All @@ -111,10 +108,11 @@ MY_HOST=demo.dcape.ru
MY_IP=${MY_IP:-192.168.23.10}
LE_ADMIN=admin@dcape.ru

$ git clone https://github.com/dopos/dcape.git
$ cd dcape
$ make install ACME=wild DNS=wild DCAPE_DOMAIN=${MY_HOST} \
git clone https://github.com/dopos/dcape.git
cd dcape
make install ACME=wild DNS=wild DCAPE_DOMAIN=${MY_HOST} \
TRAEFIK_ACME_EMAIL=${LE_ADMIN} PDNS_LISTEN=${MY_IP}:53
make echo-gitea-admin-pass
```

#### Конфигурация с удаленным gitea
Expand All @@ -131,31 +129,28 @@ GITEA_URL=${GITEA_URL:-https://git.domain.tld}
GITEA_ORG=${GITEA_ORG:-dcape}
GITEA_USER=${GITEA_USER:-dcapeadmin}

$ git clone https://github.com/dopos/dcape.git
$ cd dcape
$ make install ACME=wild DNS=wild DCAPE_DOMAIN=${MY_HOST} \
git clone https://github.com/dopos/dcape.git
cd dcape
make install ACME=wild DNS=wild DCAPE_DOMAIN=${MY_HOST} \
TRAEFIK_ACME_EMAIL=${LE_ADMIN} \
NARRA_GITEA_ORG=${GITEA_ORG} \
DRONE_ADMIN=${GITEA_USER} \
PDNS_LISTEN=${MY_IP}:53 \
GITEA=${GITEA_URL} \
AUTH_TOKEN=${AUTH_TOKEN}
make echo-gitea-admin-pass
```

Все готово - сервер `srv1.domain.tld` готов к деплою приложений, интерфейсы приложений **dcape** доступны по адресу `https://srv1.domain.tld`.

## Использование

Команды(targets) Makefile. Актуальный список доступен по команде `make[ help]`
Команды (targets) Makefile. Актуальный список: `make[ help]`.

### Git commands

#### git-%

run git for every app.
sample:
```
make git-status-s
git-% run git for every app. Sample: make git-status-s
```

### Docker-compose commands
Expand Down Expand Up @@ -206,6 +201,7 @@ make git-status-s
### Other

```
echo-% print config var. Sample: make echo-gitea-admin-pass
clean-noname delete unused docker images w/o name (you should use portainer for this)
clean-volume delete docker dangling volumes (you should use portainer for this)
help list Makefile targets (this is default target)
Expand Down

0 comments on commit 7293500

Please sign in to comment.