Core

dopos/dcape

Docker-compose application environment

Dcape is a tool which helps to create environments for docker-applications deployment using GitOps technology. Dcape based on make and docker-compose and intended to solve the following tasks:

  • using make up run applications which needs
    • shared port (ex. 80)
    • database
  • using git push deploy applications remotely on single or several computers
  • manage app configs through API or web-interface
  • limit via given user group access to used applications interfaces
  • support for letsencrypt wildcard-domains
  • manage docker objects

Applications

For solving of above-mentioned tasks dcape uses docker-images of the following applications:

Documentation

See dopos.github.io/dcape

Dependensies

Usage examples

Deploy app local

Requirements:

  • linux computer with docker and dcape
  • hostnames registered in /etc/hosts or internal DNS (for example - mysite.dev.test, www.mysite.dev.test) pointing to this computer

Static site with nginx

1
2
3
4
5
6
$ git clone https://github.com/dopos/dcape-app-nginx-sample.git
..
$ cd dcape-app-nginx-sample
$ make init up APP_SITE=mysite.dev.test
..
Creating mysite-dev-lan_www_1 ... done

That’s all - http://mysite.dev.test/ and http://www.mysite.dev.test/ are working.

Install dcape without gitea

Requirements:

  • linux computer with docker and dependensies installed
  • DNS records for wildcard-domain *.srv1.domain.tld
  • Gitea $AUTH_TOKEN created
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
MY_HOST=${MY_HOST:-srv1.domain.tld}
MY_IP=${MY_IP:-192.168.23.10}
LE_ADMIN=${LE_ADMIN:-admin@domain.tld}
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} \
  TRAEFIK_ACME_EMAIL=${LE_ADMIN} \
  NARRA_GITEA_ORG=${GITEA_ORG} \
  DRONE_ADMIN=${GITEA_USER} \
  PDNS_LISTEN=${MY_IP}:53 \
  GITEA=${GITEA_URL} \
  AUTH_TOKEN=${TOKEN}
..
Running dc command: up -d db powerdns traefik narra enfist drone portainer
Dcape URL: https://srv1.domain.tld
------------------------------------------
Creating network "dcape" with driver "bridge"
Creating dcape_narra_1         ... done
Creating dcape_db_1            ... done
Creating dcape_drone-compose_1 ... done
Creating dcape_portainer_1     ... done
Creating dcape_traefik_1       ... done
Creating dcape_drone-rd_1      ... done
Creating dcape_drone_1         ... done
Creating dcape_powerdns_1      ... done
Creating dcape_enfist_1        ... done

That’s all - server srv1.domain.tld ready for apps deployment, used dcape applications are accessible via https://srv1.domain.tld.