User Tools

Site Tools


howto:deploy_a_docker_service

How to deploy a Docker Service

Deploying a new service for Hackeriet requires completing a couple of steps:

  1. Deploying and running the application code
  2. Route traffic to the application
  3. (Optionally) register a subdomain
  4. (Optionally) expose the application publicly by routing external traffic to it

Deploying application code

app-01 hosts several of Hackeriet's services. It provides a Docker runtime, and a local reverse proxy. To set up a new app, create or place a docker compose file in a subdirectory for your app under /storage/services/.

Reverse Proxy

/etc/nginx/conf.d/<yourdnsname>.hackeriet.no

Register subdomain in DNS

blade is the primary DNS server. SSH into it, elevate to root, and edit the zonefile at /etc/nsd/pv/hackeriet.no. You want to add a CNAME record pointing at either ingress.hackeriet.no or app01.hackeriet.no, depending on whether it should be available publicly or only within Hackeriet's network.

Check that the zonefile is syntactically correct by running nsd checkzone hackeriet.no hackeriet.no. The zonefiles are in a git repository, so do not forget to commit with a descriptive commit message, and push.

TODO: Clarify if etckeeper is relevant here

Finally, to apply and test the record, reload the nameserver: systemctl reload nsd.service

/srv/hackeriet-wiki/dokuwiki/data/pages/howto/deploy_a_docker_service.txt · Last modified: by apt_idp.hackeriet.no