Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91cb09fbf8 | ||
|
|
a8406d7692 | ||
|
|
d2cb392713 | ||
|
|
26ab7144ac | ||
|
|
c626cd1693 | ||
|
|
2f35822bed | ||
|
|
8f52ba7c7b | ||
|
|
8c65605ef4 | ||
|
|
ac739e60cf | ||
|
|
9752d4b930 | ||
|
|
82d6205bbc | ||
|
|
22a934e981 | ||
|
|
a0b15ec67c | ||
|
|
7006b09ccd | ||
|
|
69a46a5474 | ||
|
|
ee30af239c | ||
|
|
a06f7633aa | ||
|
|
1116df75e5 | ||
|
|
bd0029c87b | ||
|
|
00d9088814 | ||
|
|
df68b90d58 | ||
|
|
07221d4e58 | ||
|
|
0ac0a4c060 | ||
|
|
8265c2539f | ||
|
|
1244ac4ad0 | ||
|
|
64300ede74 | ||
|
|
517b60f925 | ||
|
|
0440053fa9 | ||
|
|
a19877c376 | ||
|
|
442bad00a3 | ||
|
|
45a1cc0557 |
13
.dockerignore
Normal file
13
.dockerignore
Normal file
@@ -0,0 +1,13 @@
|
||||
/.dev
|
||||
/.idea
|
||||
/*.iml
|
||||
|
||||
/.git
|
||||
/.res
|
||||
/examples
|
||||
/.editorconfig
|
||||
/.gitignore
|
||||
/.travis.yml
|
||||
/CHANGELOG.md
|
||||
/LICENSE
|
||||
/README.md
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,6 +1,5 @@
|
||||
/.dev
|
||||
|
||||
# Jetbrains
|
||||
/.idea
|
||||
/*.iml
|
||||
|
||||
# App
|
||||
/.dev
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 76 KiB |
BIN
.res/paypal.png
BIN
.res/paypal.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 7.5 KiB |
29
.travis.yml
29
.travis.yml
@@ -5,14 +5,12 @@ services:
|
||||
|
||||
env:
|
||||
global:
|
||||
- VERSION=15802
|
||||
- VERSION=17955
|
||||
- GITHUB_REPO=crazy-max/docker-jetbrains-license-server
|
||||
- DOCKER_USERNAME=crazymax
|
||||
- DOCKER_REPONAME=jetbrains-license-server
|
||||
- QUAY_USERNAME=crazymax
|
||||
- QUAY_REPONAME=jetbrains-license-server
|
||||
- DOCKER_VERSION=17.12.0~ce-0~ubuntu
|
||||
- COMPOSE_VERSION=1.18.0
|
||||
- MICROBADGER_HOOK=https://hooks.microbadger.com/images/crazymax/jetbrains-license-server/PWF7sHnaK1djP4E9r5VY5suUqVk=
|
||||
- secure: JwfXiiIM4c6E+80O6XHQBhw6IdkerfGxlKo+YHvmtkHyz5Fvpc1ZRvWSZYHZhxE1gocThbKUCy4GsgIyiq+dsER27kdAnnvp6JLw8SZ5OSqtOOLjqCKilN2hwFaS/g6Xc3mGvTo+4ScAc9CDJamDCwGY+6r2g/+IdmCbgqOo8yaD4VkhP4eVB3f4el6F7jEwjo626QDzFZ1LVS0qmmeVBSU+xxfL5HolG+j//hLQ/49XIIGnsWtQmHbX1u2trSESyNRTFdY/KZ7qaW8l+BgLhplKu+YXAExb1POGcKJnffSJjCl22ggX1JUHANMgrcQfZe2DKkUJFqr8FvTCktj+lfAuMYwl3k24zcZHe8eTyBFh8YLs7pn++tOFWg0XcKCWO9vzHgbTf/m95F6tpDMx4Y49jRclJIslxkjf8YIuNvDOO4kPKp2bw4ymqjsayPLx3P4xB8vgvyAZeFBQevUkh3ia/3uCfwEwzWimlT1FTeDUj8h4A9y+zRy/AqGf35LneC/Sbwt5dNaCujAwOGFeCvTp43uYd10S5Rz026ecH/8XlcHzuH4+nUvXDnesRI79+6NkaKl8PdcTx0ZC44jIAULn60rur5ybNkQmv5GWjem1C24izosPuC8bLHYY6BSRPn+vacNZH9SYTw2wHiVunxZORWz4FsYAidFkoaygt9E= # DOCKER_PASSWORD
|
||||
- secure: Z+SIP2bLs70GcInLxGdYv68vXD47RIfowafFP8KpVt7EHki6AsIVJxrEH4/noj0jsx0Zyi93xAo+Z9Ms+BDsjUKeLjODS/mHjRQBrnryenjAnS8cRVvJUUDYcoY95SIOO4j6OSEIb+aI2d+6T2QX/iEgnEFDjiia2mLJ60orsWDtgoU7dgITB7ci4WkSMZl8VXtX7SUWKgVPRKkapfYX/AFUS41MZTnJvGQHCtTYlOMcS7fsf6ahjMvbTmf+otv2n688Mbg8Tz3cEw6YD5BHemfDq5qEJqjjnCtMIr5VSZttDwKwHsgmHrVEoiPq+Cdo+xwq3XCdfKu/qAD7NalBjNVaf6UjLjhkk4CWwLxQFnon1e8EC8GodXob4jQTGVOQX47lkPCvf6zM14GI1YxGMtofkv5ND7Ul/g+9fsn+b/QJFsuQb3ZA34pufjQQ5HRaj0ZU7izXIpUOu5EVo5ffrmUnrTisVNaSuIUonEt0p1WPFhdr1ScUc/VukF+wapDdSrSu/t8a5MXp0q3nZ+20NHlkm90o8umQqS8U1oo/n1hlEWTpC4PtRd4wggz0YNGTIKLpuxUt8HolU9rSPbGcbMLC53bNxnWd9KFaaFmRj5Np1GsBm2CDAPFYb3n/Dqyww+tg9Nk4MnCLMwROyZ+5Y7UQLtG5Tsh9tCtwPtT7Juk= # QUAY_PASSWORD
|
||||
@@ -20,13 +18,7 @@ env:
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-cache madison docker-ce
|
||||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce=${DOCKER_VERSION}
|
||||
- docker --version
|
||||
- curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
||||
- chmod +x docker-compose
|
||||
- sudo mv docker-compose /usr/local/bin
|
||||
- docker-compose --version
|
||||
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
|
||||
- export DOCKER_TAG=$(if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH; fi)
|
||||
- export WAN_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||
@@ -48,15 +40,16 @@ script:
|
||||
- docker ps | grep $DOCKER_REPONAME
|
||||
|
||||
after_success:
|
||||
- test $TRAVIS_PULL_REQUEST = false
|
||||
&& echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION
|
||||
&& docker push $DOCKER_USERNAME/$DOCKER_REPONAME
|
||||
&& echo "$QUAY_PASSWORD" | docker login quay.io --username "$QUAY_USERNAME" --password-stdin
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION
|
||||
&& docker push quay.io/$QUAY_USERNAME/$QUAY_REPONAME
|
||||
- |
|
||||
test $TRAVIS_PULL_REQUEST = false \
|
||||
&& echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin \
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME $DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \
|
||||
&& docker push $DOCKER_USERNAME/$DOCKER_REPONAME \
|
||||
&& echo "$QUAY_PASSWORD" | docker login quay.io --username "$QUAY_USERNAME" --password-stdin \
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$DOCKER_TAG \
|
||||
&& docker tag $DOCKER_USERNAME/$DOCKER_REPONAME quay.io/$DOCKER_USERNAME/$DOCKER_REPONAME:$VERSION \
|
||||
&& docker push quay.io/$QUAY_USERNAME/$QUAY_REPONAME \
|
||||
&& curl -X POST $MICROBADGER_HOOK
|
||||
|
||||
branches:
|
||||
|
||||
41
CHANGELOG.md
41
CHANGELOG.md
@@ -1,5 +1,46 @@
|
||||
# Changelog
|
||||
|
||||
## 17955-RC1 (2018/09/26)
|
||||
|
||||
* Upgrade to JetBrains License Server 17955
|
||||
|
||||
## 17768-RC1 (2018/09/05)
|
||||
|
||||
* Upgrade to JetBrains License Server 17768
|
||||
|
||||
## 17437-RC1 (2018/07/30)
|
||||
|
||||
* Upgrade to JetBrains License Server 17437
|
||||
|
||||
## 17211-RC1 (2018/06/29)
|
||||
|
||||
* Upgrade to JetBrains License Server 17211
|
||||
|
||||
## 17043-RC1 (2018/05/31)
|
||||
|
||||
* Upgrade to JetBrains License Server 17043
|
||||
|
||||
## 16429-RC2 (2018/04/20)
|
||||
|
||||
* JetBrains accidentally published 16743. Revert to 16429 (Issue #1)
|
||||
|
||||
## 16743-RC1 (2018/04/20)
|
||||
|
||||
* Upgrade to JetBrains License Server 16743
|
||||
* Replace Nginx + Let's Encrypt with Traefik (see docker-compose)
|
||||
|
||||
## 16429-RC1 (2018/03/20)
|
||||
|
||||
* Upgrade to JetBrains License Server 16429
|
||||
|
||||
## 15802-RC2 (2018/02/16)
|
||||
|
||||
* Add `JLS_CONTEXT` and `JLS_REPORT_OUT_OF_LICENSE` env vars
|
||||
* Timezone was not setted
|
||||
* No need of Nginx and Supervisor
|
||||
* Error while saving stats
|
||||
* Remove build dependencies
|
||||
|
||||
## 15802-RC1 (2018/02/01)
|
||||
|
||||
* Initial version based on JetBrains License Server 15802
|
||||
|
||||
32
Dockerfile
32
Dockerfile
@@ -1,11 +1,11 @@
|
||||
FROM openjdk:8-jre-alpine
|
||||
MAINTAINER CrazyMax <crazy-max@users.noreply.github.com>
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG VERSION
|
||||
|
||||
LABEL org.label-schema.build-date=$BUILD_DATE \
|
||||
LABEL maintainer="CrazyMax" \
|
||||
org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.name="jetbrains-license-server" \
|
||||
org.label-schema.description="JetBrains License Server image based on Alpine Linux" \
|
||||
org.label-schema.version=$VERSION \
|
||||
@@ -15,30 +15,30 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.vendor="CrazyMax" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN apk --update --no-cache add \
|
||||
ca-certificates curl libressl nginx supervisor tzdata zip \
|
||||
RUN apk --update --no-cache add tzdata \
|
||||
&& rm -rf /var/cache/apk/* /tmp/*
|
||||
|
||||
ENV JLS_PATH="/opt/jetbrains-license-server" \
|
||||
JLS_VERSION="15802" \
|
||||
JLS_SHA256="e0030be1fd06e2db19576363a388d8b84e7b33c9d48c54f0cfcdc032ddd96181"
|
||||
JLS_VERSION="17955" \
|
||||
JLS_SHA256="998422a48b2d568e5baafd683f9f52b54e2274a0f526afd367a8b84e81b9ec70"
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
ADD assets /
|
||||
|
||||
RUN mkdir -p "$JLS_PATH" "/data/registration" "/run/nginx" \
|
||||
&& curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/lsi.zip" \
|
||||
&& echo "$JLS_SHA256 /tmp/lsi.zip" | sha256sum -c - | grep OK \
|
||||
&& unzip "/tmp/lsi.zip" -d "$JLS_PATH" \
|
||||
&& rm -f "/tmp/lsi.zip" \
|
||||
RUN apk --update --no-cache add -t build-dependencies \
|
||||
curl zip \
|
||||
&& mkdir -p "$JLS_PATH" \
|
||||
&& curl -L "https://download.jetbrains.com/lcsrv/license-server-installer.zip" -o "/tmp/jls.zip" \
|
||||
&& echo "$JLS_SHA256 /tmp/jls.zip" | sha256sum -c - | grep OK \
|
||||
&& unzip "/tmp/jls.zip" -d "$JLS_PATH" \
|
||||
&& rm -f "/tmp/jls.zip" \
|
||||
&& chmod a+x "$JLS_PATH/bin/license-server.sh" \
|
||||
&& ln -sf "$JLS_PATH/bin/license-server.sh" "/usr/local/bin/license-server" \
|
||||
&& ln -sf "/data/registration" "/root/.jb-license-server" \
|
||||
&& touch "/data/access-config.json" \
|
||||
&& chmod a+x /entrypoint.sh
|
||||
&& chmod a+x /entrypoint.sh \
|
||||
&& apk del build-dependencies \
|
||||
&& rm -rf /var/cache/apk/* /tmp/*
|
||||
|
||||
EXPOSE 80
|
||||
VOLUME [ "/data" ]
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisord.conf" ]
|
||||
CMD [ "/usr/local/bin/license-server", "run" ]
|
||||
|
||||
38
README.md
38
README.md
@@ -6,7 +6,6 @@
|
||||
<a href="https://hub.docker.com/r/crazymax/jetbrains-license-server/"><img src="https://img.shields.io/docker/stars/crazymax/jetbrains-license-server.svg?style=flat-square" alt="Docker Stars"></a>
|
||||
<a href="https://hub.docker.com/r/crazymax/jetbrains-license-server/"><img src="https://img.shields.io/docker/pulls/crazymax/jetbrains-license-server.svg?style=flat-square" alt="Docker Pulls"></a>
|
||||
<a href="https://quay.io/repository/crazymax/jetbrains-license-server"><img src="https://quay.io/repository/crazymax/jetbrains-license-server/status?style=flat-square" alt="Docker Repository on Quay"></a>
|
||||
<a href="https://beerpay.io/crazy-max/docker-jetbrains-license-server"><img src="https://img.shields.io/beerpay/crazy-max/docker-jetbrains-license-server.svg?style=flat-square" alt="Beerpay"></a>
|
||||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3BXL8EBDJALHQ"><img src="https://img.shields.io/badge/donate-paypal-7057ff.svg?style=flat-square" alt="Donate Paypal"></a>
|
||||
</p>
|
||||
|
||||
@@ -19,25 +18,25 @@ If you are interested, [check out](https://hub.docker.com/r/crazymax/) my other
|
||||
|
||||
### Included
|
||||
|
||||
* Nginx reverse proxy
|
||||
* License server completely customizable via environment variables
|
||||
* Registration data and configuration in a single directory
|
||||
|
||||
### From docker-compose
|
||||
|
||||
* Reverse proxy with [nginx-proxy](https://github.com/jwilder/nginx-proxy)
|
||||
* Creation/renewal of Let's Encrypt certificates automatically with [letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion)
|
||||
* [Traefik](https://github.com/containous/traefik-library-image) as reverse proxy and creation/renewal of Let's Encrypt certificates
|
||||
|
||||
## Docker
|
||||
|
||||
### Environment variables
|
||||
|
||||
* `TZ` : The timezone assigned to the container (default to `UTC`)
|
||||
* `JLS_VIRTUAL_HOSTS` : [Virtual hosts](https://www.jetbrains.com/help/license_server/setting_host_and_port.html#d1010e63) where license server will be available (required ; comma delimited for several hosts)
|
||||
* `JLS_ACCESS_CONFIG` : JSON file to configure [user restrictions](https://www.jetbrains.com/help/license_server/configuring_user_restrictions.html) (default to `/data/access-config.json`)
|
||||
* `TZ` : The timezone assigned to the container (default `UTC`)
|
||||
* `JLS_VIRTUAL_HOSTS` : [Virtual hosts](https://www.jetbrains.com/help/license_server/setting_host_and_port.html#d1010e63) where license server will be available (comma delimited for several hosts)
|
||||
* `JLS_CONTEXT` : [Context path](https://www.jetbrains.com/help/license_server/setting_host_and_port.html#d1010e63) used by the license server (default `/`)
|
||||
* `JLS_ACCESS_CONFIG` : JSON file to configure [user restrictions](https://www.jetbrains.com/help/license_server/configuring_user_restrictions.html) (default `/data/access-config.json`)
|
||||
* `JLS_STATS_RECIPIENTS` : [Reports recipients](https://www.jetbrains.com/help/license_server/detailed_server_usage_statistics.html#d461e40) email addresses for stats (comma delimited)
|
||||
* `JLS_REPORT_OUT_OF_LICENSE` : [Warn about lack of licenses](https://www.jetbrains.com/help/license_server/detailed_server_usage_statistics.html#d461e40) every hour following the percentage threshold (default `0`)
|
||||
* `JLS_SMTP_SERVER` : SMTP server host to use for sending [stats](https://www.jetbrains.com/help/license_server/detailed_server_usage_statistics.html) (stats disabled if empty)
|
||||
* `JLS_SMTP_PORT` : SMTP server port (default to `25`)
|
||||
* `JLS_SMTP_PORT` : SMTP server port (default `25`)
|
||||
* `JLS_SMTP_USERNAME` : SMTP username (auth disabled if empty)
|
||||
* `JLS_SMTP_PASSWORD` : SMTP password (auth disabled if empty)
|
||||
* `JLS_STATS_FROM` : [From address](https://www.jetbrains.com/help/license_server/detailed_server_usage_statistics.html#d461e40) for stats emails
|
||||
@@ -49,18 +48,24 @@ If you are interested, [check out](https://hub.docker.com/r/crazymax/) my other
|
||||
|
||||
### Ports
|
||||
|
||||
* `80` : HTTP port
|
||||
* `80` : Jetbrains License Server HTTP port
|
||||
|
||||
## Usage
|
||||
## Use this image
|
||||
|
||||
Docker compose is the recommended way to run this image. You can use the following [docker compose template](docker-compose.yml), then run the container :
|
||||
### Docker Compose
|
||||
|
||||
Docker compose is the recommended way to run this image. Copy the content of folder [examples/compose](examples/compose) in `/var/jls/` on your host for example. Edit the compose and env files with your preferences and run the following commands :
|
||||
|
||||
```bash
|
||||
touch acme.json
|
||||
chmod 600 acme.json
|
||||
docker-compose up -d
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
Or use the following minimal command :
|
||||
### Command line
|
||||
|
||||
You can also use the following minimal command :
|
||||
|
||||
```bash
|
||||
$ docker run -d -p 8000:80 --name jetbrains-license-server \
|
||||
@@ -91,16 +96,15 @@ If you've got the following message :
|
||||
Passed value of header "Host" is not allowed. Please contact your license server administrator.
|
||||
```
|
||||
|
||||
That's because the license server is running behind the Nginx reverse proxy. Please configure virtual hosts using the `JLS_VIRTUAL_HOSTS` variable.
|
||||
That's because the license server is running behind a reverse proxy. Please configure virtual hosts using the `JLS_VIRTUAL_HOSTS` variable.
|
||||
|
||||
## How can i help ?
|
||||
## How can I help ?
|
||||
|
||||
All kinds of contributions are welcomed :raised_hands:!<br />
|
||||
All kinds of contributions are welcome :raised_hands:!<br />
|
||||
The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:<br />
|
||||
But we're not gonna lie to each other, I'd rather you buy me a beer or two :beers:!
|
||||
|
||||
[](https://beerpay.io/crazy-max/docker-jetbrains-license-server)
|
||||
or [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3BXL8EBDJALHQ)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3BXL8EBDJALHQ)
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
daemon off;
|
||||
user nginx;
|
||||
error_log stderr error;
|
||||
|
||||
events {
|
||||
worker_connections 2048;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
aio threads;
|
||||
sendfile on;
|
||||
keepalive_timeout 15;
|
||||
keepalive_disable msie6;
|
||||
keepalive_requests 100;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
server_tokens off;
|
||||
gzip off;
|
||||
|
||||
# https://www.jetbrains.com/help/license_server/configuring_secure_connection.html
|
||||
server {
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run/supervisor.sock
|
||||
|
||||
[unix_http_server]
|
||||
file=/var/run/supervisor.sock
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[program:license-server]
|
||||
priority=1
|
||||
command=/usr/local/bin/license-server run
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
@@ -1,53 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: jwilder/nginx-proxy:alpine
|
||||
labels:
|
||||
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- ./proxy/conf.d:/etc/nginx/conf.d:rw
|
||||
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
|
||||
- ./proxy/html:/usr/share/nginx/html:rw
|
||||
- ./proxy/certs:/etc/nginx/certs:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
restart: always
|
||||
|
||||
letsencrypt:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
depends_on:
|
||||
- proxy
|
||||
volumes:
|
||||
- ./proxy/certs:/etc/nginx/certs:rw
|
||||
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
|
||||
- ./proxy/html:/usr/share/nginx/html:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
restart: always
|
||||
|
||||
app:
|
||||
image: crazymax/jetbrains-license-server:latest
|
||||
depends_on:
|
||||
- letsencrypt
|
||||
- proxy
|
||||
volumes:
|
||||
- ./data:/data
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- JLS_VIRTUAL_HOSTS=jetbrains-license-server.example.com,an-other-host.example.com
|
||||
- JLS_ACCESS_CONFIG=/data/access-config.json
|
||||
- JLS_STATS_RECIPIENTS=webmaster@example.com,an-other-address@example.com
|
||||
- JLS_SMTP_SERVER=smtp.example.com
|
||||
- JLS_SMTP_PORT=25
|
||||
- JLS_SMTP_USERNAME=smtp@example.com
|
||||
- JLS_SMTP_PASSWORD=
|
||||
- JLS_STATS_FROM=jetbrains@example.com
|
||||
- JLS_STATS_TOKEN=1BFC67F51AAF99E85C2347B72E62C
|
||||
- VIRTUAL_HOST=jetbrains-license-server.example.com
|
||||
- LETSENCRYPT_HOST=jetbrains-license-server.example.com
|
||||
- LETSENCRYPT_EMAIL=webmaster@example.com
|
||||
restart: always
|
||||
@@ -1,13 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
TZ=${TZ:-"UTC"}
|
||||
JLS_PATH="/opt/jetbrains-license-server"
|
||||
JLS_LISTEN_ADDRESS="127.0.0.1"
|
||||
JLS_PORT=8080
|
||||
JLS_LISTEN_ADDRESS="0.0.0.0"
|
||||
JLS_PORT=80
|
||||
JLS_CONTEXT=${JLS_CONTEXT:-"/"}
|
||||
JLS_ACCESS_CONFIG=${JLS_ACCESS_CONFIG:-"/data/access-config.json"}
|
||||
|
||||
# Timezone
|
||||
echo "Setting timezone to ${TZ}..."
|
||||
ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime
|
||||
echo ${TZ} > /etc/timezone
|
||||
|
||||
# Init
|
||||
echo "Initializing files and folders..."
|
||||
mkdir -p /data/registration
|
||||
ln -sf "/data/registration" "/root/.jb-license-server"
|
||||
touch "/data/access-config.json"
|
||||
|
||||
# https://www.jetbrains.com/help/license_server/setting_host_and_port.html
|
||||
echo "Configuring Jetbrains License Server..."
|
||||
license-server configure --listen ${JLS_LISTEN_ADDRESS} --port ${JLS_PORT}
|
||||
license-server configure --listen ${JLS_LISTEN_ADDRESS} --port ${JLS_PORT} --context ${JLS_CONTEXT}
|
||||
|
||||
# https://www.jetbrains.com/help/license_server/setting_host_and_port.html
|
||||
if [ ! -z "$JLS_VIRTUAL_HOSTS" ] ; then
|
||||
@@ -41,6 +54,11 @@ if [ ! -z "$JLS_SMTP_SERVER" -a ! -z "$JLS_STATS_RECIPIENTS" ] ; then
|
||||
license-server configure --stats.from ${JLS_STATS_FROM}
|
||||
fi
|
||||
|
||||
if [ "$JLS_REPORT_OUT_OF_LICENSE" -gt 0 ]; then
|
||||
echo "Setting report out of licence to $JLS_REPORT_OUT_OF_LICENSE%..."
|
||||
license-server configure --reporting.out.of.license.threshold ${JLS_REPORT_OUT_OF_LICENSE}
|
||||
fi
|
||||
|
||||
echo "Stats recipients: $JLS_STATS_RECIPIENTS..."
|
||||
license-server configure --stats.recipients ${JLS_STATS_RECIPIENTS}
|
||||
fi
|
||||
|
||||
61
examples/compose/docker-compose.yml
Normal file
61
examples/compose/docker-compose.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:1.6-alpine
|
||||
command:
|
||||
- "--logLevel=INFO"
|
||||
- "--defaultentrypoints=http,https"
|
||||
- "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
|
||||
- "--entryPoints=Name:https Address::443 TLS"
|
||||
- "--docker"
|
||||
- "--docker.exposedbydefault=false"
|
||||
- "--docker.domain=example.com"
|
||||
- "--acme=false"
|
||||
- "--acme.acmelogging=true"
|
||||
- "--acme.email=webmaster@example.com"
|
||||
- "--acme.storage=acme.json"
|
||||
- "--acme.entryPoint=https"
|
||||
- "--acme.onhostrule=true"
|
||||
- "--acme.httpchallenge=true"
|
||||
- "--acme.httpchallenge.entrypoint=http"
|
||||
ports:
|
||||
- target: 80
|
||||
published: 80
|
||||
protocol: tcp
|
||||
- target: 443
|
||||
published: 443
|
||||
protocol: tcp
|
||||
volumes:
|
||||
- "./acme.json:/acme.json"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
restart: always
|
||||
|
||||
app:
|
||||
image: crazymax/jetbrains-license-server:latest
|
||||
depends_on:
|
||||
- traefik
|
||||
volumes:
|
||||
- "jetbrains-license-server:/data"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.backend=jetbrains-license-server"
|
||||
- "traefik.port=80"
|
||||
- "traefik.frontend.rule=Host:jetbrains-license-server.example.com,an-other-host.example.com"
|
||||
environment:
|
||||
- "TZ=Europe/Paris"
|
||||
- "JLS_VIRTUAL_HOSTS=jetbrains-license-server.example.com,an-other-host.example.com"
|
||||
- "JLS_CONTEXT=/"
|
||||
- "JLS_ACCESS_CONFIG=/data/access-config.json"
|
||||
- "JLS_STATS_RECIPIENTS=webmaster@example.com,an-other-address@example.com"
|
||||
- "JLS_REPORT_OUT_OF_LICENSE=90"
|
||||
- "JLS_SMTP_SERVER=smtp.example.com"
|
||||
- "JLS_SMTP_PORT=25"
|
||||
- "JLS_SMTP_USERNAME=smtp@example.com"
|
||||
- "JLS_SMTP_PASSWORD="
|
||||
- "JLS_STATS_FROM=jetbrains@example.com"
|
||||
- "JLS_STATS_TOKEN=0123456789ABCDEF"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
jetbrains-license-server:
|
||||
Reference in New Issue
Block a user