Skip to content

Commit 86a5903

Browse files
committed
add scripts for dist [ci skip]
1 parent dad8fff commit 86a5903

File tree

5 files changed

+72
-3
lines changed

5 files changed

+72
-3
lines changed

README.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ Docker image (always corresponding to latest deployed version) may be pulled fro
6060

6161
=== Building native
6262

63-
Build server by running `sbt clean assembly`. The output will be a jar file in `target/scala-*/scheme-index.jar`
64-
Build frontend by running `npm run build` in subfolder `frontend`. The output will be in `frontend/dist/frontend`
65-
Build documentation using `asciidoctor README.adoc`. The output will be `README.html`
63+
Build server by running `sbt clean assembly`. The output will be a jar file in `target/scala-*/scheme-index.jar`.
64+
65+
Build frontend by running `npm run build` in subfolder `client/frontend`. The output will be in `client/frontend/dist/frontend`.
66+
67+
Build CLI app by running `npm run build` in subfolder `client/cli`. The output will be in `client/cli/dist`.
68+
69+
Build documentation using `asciidoctor README.adoc`. The output will be `README.html`.
6670

6771
=== Running native
6872

docker/distmaker/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM scheme-index-tmp
2+
3+
FROM scheme-index-nginx-tmp
4+
5+
FROM alpine:latest
6+
RUN apk update; apk add zip
7+
RUN mkdir /dist
8+
COPY --from=0 /app /dist/app
9+
RUN mkdir /dist/nginx
10+
RUN mkdir /dist/nginx/conf
11+
COPY --from=1 /www/data /dist/nginx/www/data
12+
COPY --from=1 /etc/nginx/mime.types /dist/nginx/conf/mime.types
13+
COPY nginx.conf /dist/nginx/conf/nginx.conf
14+
COPY README.txt /dist/README.txt
15+
RUN zip -r /dist.zip /dist

docker/distmaker/README.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Scheme index dockerless distribution.
2+
3+
This file only concerns launching specifics, general documentation available at nginx/www/data/README.html.
4+
5+
## Running Java app
6+
7+
Install JDK version 11+
8+
Change directory to app folder
9+
Run `java -jar scheme-index.jar` to start
10+
11+
## Running Nginx server
12+
13+
Install nginx
14+
Run `nginx -p <nginx-folder>` to start
15+
Run `nginx -p <nginx-folder> -s stop` to stop
16+
where <nginx-folder> is the "nginx" folder that was extracted from scheme index zip, not some folder of nginx installation.
17+
Make sure nginx has read permissions to the static files; in particular, it won't work out of the box under user home directory.

docker/distmaker/distzip.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
docker build -t scheme-index-tmp -f ../scheme-index/Dockerfile ../..
3+
docker build -t scheme-index-nginx-tmp -f ../nginx/Dockerfile ../..
4+
docker build -t scheme-index-dist -f Dockerfile .
5+
docker create --name dummy scheme-index-dist
6+
docker cp dummy:/dist.zip dist.zip
7+
docker rm -f dummy
8+
docker rmi scheme-index-dist scheme-index-tmp scheme-index-nginx-tmp

docker/distmaker/nginx.conf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
events {}
2+
3+
http {
4+
5+
gzip on;
6+
gzip_proxied any;
7+
error_log errors.txt;
8+
access_log access.txt;
9+
include mime.types;
10+
11+
server {
12+
listen 80;
13+
root www/data;
14+
15+
location /rest {
16+
proxy_pass http://localhost:8080;
17+
proxy_intercept_errors on;
18+
}
19+
20+
location / {
21+
try_files $uri $uri/ /index.html;
22+
}
23+
}
24+
25+
}

0 commit comments

Comments
 (0)