annotate docker/README @ 9795:8d71363cd3bd 3.2.x

Use multi-stage build to speedup build and shrink image
author Tom Gottfried <tom@intevation.de>
date Thu, 02 Nov 2023 14:37:47 +0100
parents a00bb9d39c16
children 5141e37b9ef0
rev   line source
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
1 Configure:
9747
cfc0aab9947f Enable bind-mounting client configuration in docker container
Tom Gottfried <tom@intevation.de>
parents: 9746
diff changeset
2 _ Add to gwt-client/config/mapfish/config.yaml to enable map printing:
9743
d1dcb8d28b0d Consider map printing in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
3 - !dnsMatch
d1dcb8d28b0d Consider map printing in Docker setup
Tom Gottfried <tom@intevation.de>
parents: 9739
diff changeset
4 host: <your-host>
9791
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
5 port: <your-host-port>
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
6
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
7
9720
13e2d38ad314 Improve Docker based setup
Tom Gottfried <tom@intevation.de>
parents: 9716
diff changeset
8 Build and run:
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
9
9720
13e2d38ad314 Improve Docker based setup
Tom Gottfried <tom@intevation.de>
parents: 9716
diff changeset
10 $ cd docker
13e2d38ad314 Improve Docker based setup
Tom Gottfried <tom@intevation.de>
parents: 9716
diff changeset
11 $ docker-compose up
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
12
9791
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
13 Lookup the allocated host port:
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
14
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
15 $ docker compose port wiki 80
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
16
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
17 The application should now be accessible on your docker host
a00bb9d39c16 Drop explicit host ports
Tom Gottfried <tom@intevation.de>
parents: 9779
diff changeset
18 (e.g. http://your-host:your-host-port).
9686
33303817ed37 Deploy webapp as d4e-river
Tom Gottfried <tom@intevation.de>
parents: 9684
diff changeset
19 See docker/flys_user_file for credentials.
33303817ed37 Deploy webapp as d4e-river
Tom Gottfried <tom@intevation.de>
parents: 9684
diff changeset
20
9779
3847836c60b5 Improve backend build for different database backends
Tom Gottfried <tom@intevation.de>
parents: 9760
diff changeset
21 In case an Oracle database should be used, the server service has to be
3847836c60b5 Improve backend build for different database backends
Tom Gottfried <tom@intevation.de>
parents: 9760
diff changeset
22 build with a build-time argument:
3847836c60b5 Improve backend build for different database backends
Tom Gottfried <tom@intevation.de>
parents: 9760
diff changeset
23
3847836c60b5 Improve backend build for different database backends
Tom Gottfried <tom@intevation.de>
parents: 9760
diff changeset
24 $ docker-compose build --build-arg ORACLE=true server
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
25
9760
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
26 Remote debugging:
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
27
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
28 To enable remote debugging of the artifact server, uncomment the respective
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
29 lines in docker-compose.yml, recreate the service and e.g. attach with JDB:
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
30 $ docker-compose up -d
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
31 $ jdb -attach <your-docker-host>:8787 -sourcepath<your-checkout>/artifacts/src/main/java
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
32
9bbb29142ddb Give hints for remote debugging artifact server
Tom Gottfried <tom@intevation.de>
parents: 9755
diff changeset
33
9684
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
34 TODO:
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
35 _ Avoid having to change configuration manually
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
36 _ Something better than setting framework and http-client to a branch
537fe44f2792 Add basic Docker setup for development
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
37 explicitly in the Dockerfiles

http://dive4elements.wald.intevation.org