Code Monkey home page Code Monkey logo

docker-youtrack's Introduction

docker-youtrack

Easy youtrack deployment using docker

These Dockerfiles allow you to easily build images to deploy your own youtrack instance.

Disclaimer

Besides that, as always, use these scripts with care.

Don't forget to back up your data very often, too.

Requirements

Docker has to run. It supports many platforms like Ubuntu, Arch Linux, Mac OS X, Windows, EC2 or the Google Cloud. Click here to get specific infos on how to install on your platform.

Oh nice! How do I do it?

  1. Install docker. It's not very hard.
  2. Run it! (Stop with CTRL-C, repeat at pleasure)

docker run -t -i -p 8080:8080 dzwicker/docker-youtrack

Now open your browser and point it to http://localhost:8080 and rejoice. :)

Do it as service in ubuntu/debian

  1. Create directory to store data
mkdir -p /var/lib/youtrack
mkdir -p /var/log/youtrack
mkdir -p /etc/youtrack
  1. Permissions!

The Dockerfile creates a youtrack user to run youtrack without root permissions. This user has a UID of 2000. Please make sure to add a user to your host system with this UID and allow him to read and write to /var/lib/youtrack. The name of this host user in not important. (You can use a the user group, too. It has the GID of 2000 :)

  1. Create container!

    docker create -t -i -p 127.0.0.1:8080:8080 \
     	-v /var/lib/youtrack:/var/lib/youtrack \ 
     	-v /var/log/youtrack:/var/log/youtrack \
     	-v /etc/youtrack:/usr/local/youtrack/conf \
     	-v /tmp:/tmp \
     	--name docker-youtrack \
    dzwicker/docker-youtrack
    
  2. Create upstart configuration /etc/init/docker-youtrack.conf

    description "Docker Youtrack"
    start on filesystem and started docker
    stop on runlevel [!2345]
    respawn
    script
      /usr/bin/docker start -a docker-youtrack >>/var/log/youtrack/docker-youtrack.log 2>&1
    end script
    
  3. (optional) Setup logrotate e.g. /etc/logrotate.d/docker-youtrack

     /var/log/youtrack/*.log
     /var/log/youtrack/hub/*.log
     /var/log/youtrack/hub/logs/*.log
     /var/log/youtrack/youtrack/*.log
     /var/log/youtrack/youtrack/logs/*.log
     /var/log/youtrack/internal/services/bundleProcess/*.log
      {
         rotate 7
         daily
         missingok
         notifempty
         sharedscripts
         copytruncate
         compress
     }
    
    
  4. (optional) Add vhost to nginx

    mkdir -p /var/log/nginx/your-domain

    upstream docker-youtrack {
      server localhost:8080;
    }
    
    server {
      listen 80;
      server_name           your-domain.com;
    
      access_log            /var/log/nginx/your-domain/access.log;
      error_log             /var/log/nginx/your-domain/error.log;
    
      proxy_set_header Host       $http_host;   # required for docker client's sake
      proxy_set_header X-Real-IP  $remote_addr; # pass on real client's IP
    
      client_max_body_size 0; # disable any limits to avoid HTTP 413 for large image uploads
    
      # required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486)
      chunked_transfer_encoding on;
    
      location / {
        proxy_pass http://docker-youtrack;
      }
    
    }
    
  5. Configuring New YouTrack Server

    Follow the steps of the installation instructions for Jetbrains Youtrack using paths located under /var/lib/hub/data, /var/lib/hub/backups, /var/log/hub, /tmp.

docker-youtrack's People

Contributors

aniketdivekar avatar bitdeli-chef avatar dzwicker avatar fxhibon avatar tpaulus avatar yusuke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-youtrack's Issues

After successful initial run, unable to setup

My directory tree looks like:

.
├── docker-compose.yml
├── tmp
├── usr
│   └── local
│       └── youtrack
│           └── conf
└── var
    ├── lib
    │   └── youtrack
    └── log
        └── youtrack

And my docker-compose.yml looks like:

youtrack:
  image: dzwicker/docker-youtrack
  ports:
   - 8080:8080
  volumes:
   - ./var/lib/youtrack:/var/lib/youtrack
   - ./var/log/youtrack:/var/log/youtrack
   - ./usr/local/youtrack/conf:/usr/local/youtrack/conf
   - ./tmp:/tmp
  container_name: youtrack

tmp/, usr/, and var/ are owned by 2000:2000 recursively.

I run the container with docker-compose up -d

It boots fine and allows me to register a user, however after registration the user account I just created is not recognized. My concern is whether there is some data persistence I'm unaware of, or if docker-compose is bringing it's own issues. If I remove all mention of volumes from docker-compose.yml then it loads fine and I can register and login, however I lose persistence.

As a side note, I'm also wondering if there should be more locations to be exposed as shared volumes, for instance to back up data from the built-in hub?

Thanks

Address already in use

If I already have a busy port, and I'm running a command, an error occurs:
sudo docker run -t -i -p 8080:8080 dzwicker/docker-youtrack

Maybe people should first check if the port is free, and then execute the command? And write about this in the documentation?

Youtrack is frozen

The Youtrack is frozen for a few hours and nothing happened

I usage:

$ sudo docker run -t -i -p 8020:8020 dzwicker/docker-youtrack
Starting YouTrack...
* Configuring JetBrains YouTrack 2017.3 
* Made default base-url 'http://0079a3c2724c:8080/' from hostname '0079a3c2724c' and listen port '8080' 
* JetBrains YouTrack 2017.3 runtime environment is successfully configured 
* Loading logging configuration from /usr/local/youtrack/lib/ext/log4j.xml 
* Redirecting JetBrains YouTrack 2017.3 logging to /usr/local/youtrack/logs/internal/services/bundleProcess 
* Configuring Service-Container[bundleProcess] 
* Configuring Bundle Backend Service 
* Configuring Configuration Wizard 
* Starting Service-Container[bundleProcess] 
* Starting Bundle Backend Service 
* Starting Configuration Wizard 
* JetBrains YouTrack 2017.3 Configuration Wizard will be available on [http://0079a3c2724c:8080] after start 

http://0079a3c2724c:8080 - not working

$ sudo docker ps
[sudo] password for user: 
CONTAINER ID        IMAGE                      COMMAND                 CREATED             STATUS              PORTS                              NAMES
0079a3c2724c        dzwicker/docker-youtrack   "/entry-point.sh run"   3 minutes ago       Up 3 minutes        0.0.0.0:8020->8020/tcp, 8080/tcp   affectionate_visvesvaraya

Error running docker..

Brand new ubuntu install, new docker install, all updates applied
Gives error see picture.

image

Error with SSL

When trying to set up VCS integration I ran into the following (which occurs each time I select Connect to VCS Server):

21:01:35,498 ERROR [ErrorExceptionMapper          ] [p2124497057-590] [[email protected]] Caught exception during ring
javax.ws.rs.ProcessingException: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.securorithmParameterException: the trustAnchors parameter must be non-empty
        at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:286)
        at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
        at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
        at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
        at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
        at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
        at jetbrains.youtrack.integration.github.rest.BitBucketRest.get(BitBucketRest.java:191)
        at jetbrains.youtrack.integration.github.rest.GitLabRest.getUserName(GitLabRest.java:98)
        at jetbrains.youtrack.integration.github.persistence.GitLabServerImpl.getLogin(GitLabServerImpl.java:161)
        at jetbrains.youtrack.integration.github.rest.VCSHostingServer.login(VCSHostingServer.kt:21)
        at jetbrains.youtrack.integration.github.rest.RemoteRepositoriesResource.repos(RestResources.kt:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodIerFactory.java:81)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceer.java:144)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourcher.java:161)
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(thodDispatcherProvider.java:143)
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResoutcher.java:99)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
        at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
        at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
        at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:460)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
        at webr.framework.controller.BaseApplicationServletFilter.doFilter(BaseApplicationServletFilter.java:24)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at com.jetbrains.bundle.proxy.jetty.AllowOriginOneTimeFilter.doFilter(AllowOriginOneTimeFilter.java:37)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:259)
        at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:222)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmPaon: the trustAnchors parameter must be non-empty
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1937)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1894)
        at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1877)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1398)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.j
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
        at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:389)
        at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:284)
        ... 67 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAer must be non-empty
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90)
        at sun.security.validator.Validator.getInstance(Validator.java:179)
        at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312)
        at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:105)
        at jetbrains.charisma.ssl.core.CompositeTrustManager.checkST(CompositeTrustManager.java:53)
        at jetbrains.charisma.ssl.core.CompositeTrustManager.checkServerTrusted(CompositeTrustManager.java:38)
        at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:922)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391)
        ... 76 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
        at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
        at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88)
        ... 91 more

based on some googling this would appear be to a problem with the JDK implementation used in the image:

http://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty

I honestly don't know what version of JDK is being used here, or what the source is (ubuntu? jetbrains?), or whether it's even an issue with that or my self-signed cert...

restore data

how to restore data from another server using backup ??

SSL using nginx-proxy

Hello

I have tried using https://github.com/jwilder/nginx-proxy but with SSL with no luck

/usr/bin/docker run -t \
	--name youtrack \
	-v /data/youtrack/data/:/opt/youtrack/data/ \
	-v /data/youtrack/backup/:/opt/youtrack/backup/ \
	-e VIRTUAL_HOST=sub.domain.com \
	-e VIRTUAL_PROTO=https \
	uniplug/youtrack

but It does not work really.. not sure where to look at. maybe you have some ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.