-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.env* | ||
dockerhub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# app custom Makefile | ||
|
||
# Docker repo & image name without version | ||
IMAGE ?= registry | ||
# Hostname for external access | ||
APP_SITE ?= dhub.dev.lan | ||
|
||
# ------------------------------------------------------------------------------ | ||
# app custom config | ||
|
||
IMAGE_VER ?= 2 | ||
|
||
LIB_PATH ?= dockerhub | ||
DCAPE_ROOT ?= /opt/dcape/var | ||
|
||
# ------------------------------------------------------------------------------ | ||
# .env template (custom part) | ||
# inserted in .env.sample via 'make config' | ||
define CONFIG_CUSTOM | ||
# ------------------------------------------------------------------------------ | ||
# app custom config, generated by make config | ||
# db:$(USE_DB) user:$(ADD_USER) | ||
|
||
# Relative path to library sources from DCAPE/var | ||
LIB_PATH=$(LIB_PATH) | ||
|
||
# Path to /opt/dcape/var. Used only outside drone | ||
DCAPE_ROOT=$(DCAPE_ROOT) | ||
|
||
endef | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Find and include DCAPE/apps/drone/dcape-app/Makefile | ||
DCAPE_COMPOSE ?= dcape-compose | ||
DCAPE_MAKEFILE ?= $(shell docker inspect -f "{{.Config.Labels.dcape_app_makefile}}" $(DCAPE_COMPOSE)) | ||
ifeq ($(shell test -e $(DCAPE_MAKEFILE) && echo -n yes),yes) | ||
include $(DCAPE_MAKEFILE) | ||
else | ||
include /opt/dcape-app/Makefile | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,49 @@ | ||
# dcape-app-registry | ||
Private docker registry for dcape users | ||
|
||
[![GitHub Release][1]][2] [![GitHub code size in bytes][3]]() [![GitHub license][4]][5] | ||
|
||
[1]: https://img.shields.io/github/release/dopos/dcape-app-registry.svg | ||
[2]: https://github.com/dopos/dcape-app-registry/releases | ||
[3]: https://img.shields.io/github/languages/code-size/dopos/dcape-app-registry.svg | ||
[4]: https://img.shields.io/github/license/dopos/dcape-app-registry.svg | ||
[5]: LICENSE | ||
|
||
[Docker registry](https://github.com/distribution/distribution) application package for [dcape](https://github.com/dopos/dcape). | ||
Access to registry is limited by [gitea](https://gitea.io) users the same way as other private [dcape](https://github.com/dopos/dcape) resources. | ||
|
||
## Docker image used | ||
|
||
* [registry](https://hub.docker.com/_/registry) | ||
|
||
## Requirements | ||
|
||
* linux 64bit (git, make, wget, gawk, openssl) | ||
* [docker](http://docker.io) | ||
* [dcape](https://github.com/dopos/dcape) | ||
* [gitea](https://gitea.io) | ||
|
||
## Usage | ||
|
||
* Gitea: Fork or mirror this repo in your Git service | ||
* Drone: Activate repo | ||
* Gitea: "Test delivery", config sample will be saved to enfist | ||
* Enfist: Edit config and remove .sample from name | ||
* Gitea: "Test delivery" again (or Drone: "Restart") - app will be installed and started on webhook host | ||
|
||
## TODO | ||
|
||
* [ ] send image prefix to narra and check its presense in user's organizations list | ||
|
||
## See also | ||
|
||
* for docker registry: https://github.com/cesanta/docker_auth [out of time](https://github.com/cesanta/docker_auth/issues/288#issuecomment-702931777) | ||
* https://github.com/goharbor/harbor | ||
* http://port.us.org/ (wait for gitea support [here](http://port.us.org/features/oauth.html)) | ||
* [Deploy apps with dcape](https://dopos.github.io/dcape/usage/apps/) | ||
|
||
## License | ||
|
||
The MIT License (MIT), see [LICENSE](LICENSE). | ||
|
||
Copyright (c) 2022 Aleksey Kovrizhkin <lekovr+dopos@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '2.1' | ||
|
||
services: | ||
|
||
app: | ||
image: ${IMAGE}:${IMAGE_VER} | ||
restart: always | ||
labels: | ||
- "dcape.traefik.tag=${DCAPE_TAG}" | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.${APP_TAG}.middlewares=narra" | ||
volumes: | ||
- /etc/timezone:/etc/timezone:ro | ||
- /etc/localtime:/etc/localtime:ro | ||
- ${DCAPE_ROOT}/${LIB_PATH}:/var/lib/registry | ||
|