Last active
September 28, 2018 21:49
-
-
Save mjaroszek/991d6e16287b74d34e9c51148d23d304 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
1. `Dockerfile` with content: | |
``` | |
FROM jenkinsci/jenkins:2.9 | |
``` | |
1. Create `jenkins` app: | |
``` | |
$ dokku apps:create jenkins | |
-----> Application name is jenkins | |
Creating jenkins... done | |
``` | |
1. Map port 80 to Jenkins default port (8080): | |
``` | |
$ dokku proxy:ports-add jenkins http:80:8080 | |
-----> Setting config vars | |
DOKKU_PROXY_PORT_MAP: http:80:8080 | |
-----> Setting config vars | |
DOKKU_NGINX_PORT: 80 | |
-----> Configuring dev.kozminski.me...(using built-in template) | |
-----> App jenkins has not been deployed. Skipping nginx config creation | |
``` | |
1. Add external storage to jenkins app: | |
``` | |
$ dokku storage:mount jenkins /var/lib/dokku/data/storage/jenkins:/var/jenkins_home | |
``` | |
1. Add remote: | |
``` | |
$ git remote add dokku dokku@[HOST]:jenkins | |
``` | |
1. Deploy: | |
``` | |
$ git add . | |
``` | |
``` | |
$ git commit -m 'Jenkins' | |
[master (root-commit) 3798ef9] Jenkins | |
1 file changed, 1 insertion(+) | |
create mode 100644 Dockerfile | |
``` | |
``` | |
$ git push dokku master | |
Counting objects: 3, done. | |
Writing objects: 100% (3/3), 239 bytes | 0 bytes/s, done. | |
Total 3 (delta 0), reused 0 (delta 0) | |
-----> Cleaning up... | |
-----> Building jenkins from dockerfile... | |
remote: build context to Docker daemon 2.048 kB | |
Step 1 : FROM jenkinsci/jenkins:2.9 | |
---> a72096e8eaf5 | |
Successfully built a72096e8eaf5 | |
-----> Setting config vars | |
DOKKU_DOCKERFILE_PORTS: 50000/tcp 8080/tcp | |
-----> Releasing jenkins (dokku/jenkins:latest)... | |
-----> Deploying jenkins (dokku/jenkins:latest)... | |
-----> Attempting to run scripts.dokku.predeploy from app.json (if defined) | |
-----> No Procfile found in app image | |
-----> DOKKU_SCALE file not found in app image. Generating one based on Procfile... | |
-----> New DOKKU_SCALE file generated | |
=====> web=1 | |
-----> Attempting pre-flight checks | |
For more efficient zero downtime deployments, create a file CHECKS. | |
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples | |
CHECKS file not found in container: Running simple container check... | |
-----> Waiting for 10 seconds ... | |
-----> Default container check successful! | |
-----> Running post-deploy | |
-----> Attempting to run scripts.dokku.postdeploy from app.json (if defined) | |
=====> renaming container (36082cc9c972) boring_fermat to jenkins.web.1 | |
-----> Creating new /home/dokku/jenkins/VHOST... | |
-----> Configuring jenkins.dev.kozminski.me...(using built-in template) | |
-----> Creating http nginx.conf | |
-----> Running nginx-pre-reload | |
Reloading nginx | |
-----> Setting config vars | |
DOKKU_APP_RESTORE: 1 | |
=====> Application deployed: | |
http://jenkins.[HOST] | |
To dokku@[HOST]:jenkins | |
* [new branch] master -> master | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment