Skip to content

Commit

Permalink
Merge pull request #8 from srl295/icu4c-gce
Browse files Browse the repository at this point in the history
ICU-13668 update ICU4C Demos to run in GCE
  • Loading branch information
srl295 authored Sep 27, 2019
2 parents db3367d + 81c2d79 commit 7265ca2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
6 changes: 3 additions & 3 deletions icu-kube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Dockerized ICU4C Demos

- Build with `sh build.sh`

- Run with `docker run --rm -p 18080:80 unicode/icu4c-demos:latest` - will listen on port 18080
- Run with `docker run --rm -p 18080:8080 unicode/icu4c-demos:latest` - will listen on port 18080

## Building with a special ICU version

Expand Down Expand Up @@ -37,7 +37,7 @@ $ docker build --build-arg ICU_PATH=http://999.999.999.999:5000/icu-r84d16d8c6c-
- If all goes well (it did, right?): you can now run

```sh
$ docker run --rm -p 8888:80 icu4c-demos:my-demos
$ docker run --rm -p 8888:8080 icu4c-demos:my-demos
```

… That will serve up the demos at http://localhost:8888/icu-bin/icudemos
… That will serve up the demos at http://localhost:8888/icu-bin/icudemos
3 changes: 2 additions & 1 deletion icu-kube/docker.d/icu4c-demos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN if [ $ICU_PATH = "system" ]; then apk --update add icu-dev ; else apk --upda
COPY --from=build /home/build/icu /home/build/icu
RUN if [ -d /home/build/icu/usr/local ]; then (cd /home/build/icu/usr/; ln -sv local/* .); fi; ls -l /home/build/icu/usr/bin/
ENV LD_LIBRARY_PATH /home/build/icu/usr/lib
EXPOSE 80
EXPOSE 8080
COPY icu-kube/lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY icu-kube/index.html /var/www/localhost/htdocs/index.html
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
2 changes: 2 additions & 0 deletions icu-kube/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Click here for the <a href="./icu-bin/icudemos">ICU4C Demos</a>.

13 changes: 11 additions & 2 deletions icu-kube/lighttpd.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
server.modules = ( "mod_alias", "mod_redirect", "mod_cgi" )
server.document-root = "/var/www/html"
server.document-root = "/var/www/localhost/htdocs/"
index-file.names = ( "index.html" )

server.port = 8080

mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)

server.port = 80

$HTTP["url"] =~ "^/icu-bin/" {
alias.url += ( "/icu-bin/" => "/home/build/icu/usr/bin/" )
Expand Down

0 comments on commit 7265ca2

Please sign in to comment.