annotate docker/README.md @ 5702:fe83406fe7ed sr-v2

Fix bug in sorting the vertices.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 14 Feb 2024 22:38:14 +0100
parents 8dd59e2c9d3d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
1 # Build and run your dev environment using Docker
524
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
2
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
3 - [Build and run your dev environment using Docker](#build-and-run-your-dev-environment-using-docker)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
4 - [Build and run your gemma application with Docker Compose in one step](#build-and-run-your-gemma-application-with-docker-compose-in-one-step)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
5 - [Hints and tricks](#hints-and-tricks)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
6 - [Build and run the gemma application with Docker manually](#build-and-run-the-gemma-application-with-docker-manually)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
7 - [Network setup](#network-setup)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
8 - [Database setup](#database-setup)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
9 - [Create ER diagrams](#create-er-diagrams)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
10 - [GeoServer setup](#geoserver-setup)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
11 - [Gemma backend setup](#gemma-backend-setup)
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
12 - [SPA setup](#spa-setup)
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
13
524
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
14 Run the `build` commands from the root of your checkout, because it is
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
15 assumed as the context!
36
333c42e341e5 Add README.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
16
524
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
17 Other example commands, too, assume they are run from the root of your
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
18 checkout.
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
19
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
20 ## Build and run your gemma application with Docker Compose in one step
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
21
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
22 Requires at least Docker Engine release 17.12.0+. Because of Compose file
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
23 format 3.5 for named networks.
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
24
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
25 If you fiddle around with the following error message: `Version in
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
26 "./docker-compose.yml" is unsupported` take a look at the comments in the
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
27 head of the `docker-compose.yml` file.
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
28
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
29 From your docker directory, start up your gemma application by running
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
30 `docker-compose up`. Here an example for build and running the gemma
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
31 application:
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
32
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
33 ```shell
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
34 cd docker
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
35 docker-compose -p gemma up
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
36 ```
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
37
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
38 Note: The `-p` flag specifies an alternate project name (default: directory
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
39 name).
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
40
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
41 Now you should be able to use the application in your browser by going to
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
42 `http://HOSTNAME:8290`, with `HOSTNAME` being the hostname of your docker
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
43 host.
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
44
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
45 Stop the application, either by running `docker-compose down` from within your
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
46 docker directory in the second terminal, or by hitting `CTRL+C` in the
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
47 original terminal where you started the gemma application.
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
48
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
49 ### Hints and tricks
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
50
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
51 If you want to run your services in the background, you can pass the `-d` flag
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
52 (for `detached` mode) to `docker-compose up` and use `docker-compose ps` to see
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
53 what is currently running. Take a look at the following example.
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
54
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
55 ```shell
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
56 docker-compose up -d
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
57 Starting gemma_db ...
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
58 Starting gemma_db ... done
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
59 Starting gemma_geoserver ...
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
60 Starting gemma_geoserver ... done
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
61 Starting gemma_backend ...
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
62 Starting gemma_backend ... done
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
63 Starting gemma_spa ...
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
64 Starting gemma_spa ... done
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
65 ```
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
66
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
67 ```shell
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
68 docker-compose ps
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
69 Name Command State Ports
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
70 ----------------------------------------------------------------------------------
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
71 gemma_backend /usr/local/bin/gemma -c /o ... Up 0.0.0.0:8200->8000/tcp
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
72 gemma_db /usr/lib/postgresql/11/bin ... Up 0.0.0.0:54321->5432/tcp
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
73 gemma_geoserver /usr/share/tomcat8/bin/cat ... Up 0.0.0.0:8280->8080/tcp
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
74 gemma_spa /bin/sh -c make -f Makefil ... Up 0.0.0.0:8290->8080/tcp
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
75 ```
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
76
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
77 For more infos about Docker Compose take a look at:
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
78 https://docs.docker.com/compose/
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
79
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
80 ## Build and run the gemma application with Docker manually
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
81
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
82 Or build and run your dev enviroment manually by the following steps.
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
83
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
84 ### Network setup
712
86725b39b2d2 Improve reproducability of documented docker commands
Tom Gottfried <tom@intevation.de>
parents: 596
diff changeset
85
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
86 Create a network to connect containers:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
87
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
88 ```shell
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
89 docker network create gemma
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
90 ```
712
86725b39b2d2 Improve reproducability of documented docker commands
Tom Gottfried <tom@intevation.de>
parents: 596
diff changeset
91
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
92 ### Database setup
36
333c42e341e5 Add README.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
93
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
94 Build `gemma_db` docker image with e.g.:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
95
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
96 ```shell
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
97 docker build -t gemma_db -f docker/Dockerfile.db .
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
98 ```
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
99
4165
8dd59e2c9d3d Add Dockerfile for testing with upstream PostgreSQL/PostGIS
Tom Gottfried <tom@intevation.de>
parents: 2778
diff changeset
100 In order to test the latest upstream PostgreSQL 11 and PostGIS 2.5,
8dd59e2c9d3d Add Dockerfile for testing with upstream PostgreSQL/PostGIS
Tom Gottfried <tom@intevation.de>
parents: 2778
diff changeset
101 use Dockerile.pg instead.
8dd59e2c9d3d Add Dockerfile for testing with upstream PostgreSQL/PostGIS
Tom Gottfried <tom@intevation.de>
parents: 2778
diff changeset
102
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
103 Get a running instance with e.g.:
101
aa32ffd5060b Mention tests in README.
Tom Gottfried <tom@intevation.de>
parents: 83
diff changeset
104
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
105 ```shell
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
106 docker run --name gemma-db -d -p 54321:5432 -v $PWD/schema:/opt/gemma \
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
107 --network gemma gemma_db
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
108 ```
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
109
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
110 Use `--network-alias gemma-db` if your container has a different name
524
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
111
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
112 Run tests for [Row-Level Security](https://www.postgresql.org/docs/11/ddl-rowsecurity.html) (RLS)
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
113 policies:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
114
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
115 ```shell
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
116 docker exec gemma-db ./run_tests.sh
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
117 ```
524
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
118
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
119 ### Create ER diagrams
83
d9d01dc58f60 Update README.
Tom Gottfried <tom@intevation.de>
parents: 68
diff changeset
120
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
121 Assuming you have installed `postgresql-autodoc` and
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
122 [graphviz](http://graphviz.org/) on a machine from which you can reach your
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
123 docker host, you can use the following:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
124
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
125 ER diagram with waterway related tables:
83
d9d01dc58f60 Update README.
Tom Gottfried <tom@intevation.de>
parents: 68
diff changeset
126
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
127 ```shell
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
128 postgresql_autodoc -p 54321 -h $dockerhost \
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
129 -d gemma -U sophie --password=so2Phie4 \
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
130 -t dot -l . -s 'waterway'
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
131 dot -Tpdf gemma.dot > gemma_waterway.pdf
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
132 ```
524
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
133
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
134 Omit the `-s` option to get a diagram with all tables or use any other
156a805941b5 Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents: 174
diff changeset
135 schema name to see other parts of the whole picture.
561
8f075ae6cf33 Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents: 524
diff changeset
136
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
137 ### GeoServer setup
561
8f075ae6cf33 Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents: 524
diff changeset
138
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
139 Build `gemma_geoserver` docker image with e.g.:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
140
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
141 ```shell
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
142 docker build -t gemma_geoserver -f docker/Dockerfile.geoserv .
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
143 ```
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
144
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
145 Get a running instance with e.g.:
561
8f075ae6cf33 Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents: 524
diff changeset
146
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
147 ```shell
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
148 docker run --name gemma-geoserver -d -p 8280:8080 --network gemma \
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
149 gemma_geoserver
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
150 ```
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
151
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
152 Use `--network-alias gemma-geoserver` if you give your container
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
153 a different name.
561
8f075ae6cf33 Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents: 524
diff changeset
154
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
155 ### Gemma backend setup
561
8f075ae6cf33 Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents: 524
diff changeset
156
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
157 Build `gemma_backend` docker image with e.g.:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
158
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
159 ```shell
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
160 docker build -t gemma_backend -f docker/Dockerfile.backend .
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
161 ```
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
162
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
163 Get a running instance with e.g.:
561
8f075ae6cf33 Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents: 524
diff changeset
164
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
165 ```shell
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
166 docker run --name gemma-backend -v $PWD:/opt/gemma -d -p 8200:8000 \
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
167 --network gemma gemma_backend
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
168 ```
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
169
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
170 Use `--network-alias gemma-backend` if you give your container
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
171 a different name.
596
6d7c0dbf9d21 Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents: 561
diff changeset
172
2163
b6b699385302 Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents: 2142
diff changeset
173 ### SPA setup
596
6d7c0dbf9d21 Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents: 561
diff changeset
174
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
175 Build `gemma_spa` docker image with e.g.:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
176
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
177 ```shell
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
178 docker build -t gemma_spa -f docker/Dockerfile.spa .
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
179 ```
596
6d7c0dbf9d21 Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents: 561
diff changeset
180
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
181 Get a running instance with e.g.:
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
182
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
183 ```shell
2778
7ebd4154894e Adopt container names to fix GeoServer startup
Tom Gottfried <tom@intevation.de>
parents: 2163
diff changeset
184 docker run --name gemma-spa -v $PWD/client:/opt/gemma/client -d -p 8290:8080 \
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
185 --network gemma gemma_spa
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
186 ```
596
6d7c0dbf9d21 Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents: 561
diff changeset
187
6d7c0dbf9d21 Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents: 561
diff changeset
188 Now you should be able to use the application in your browser by going to
2142
70471052f6b0 docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents: 1982
diff changeset
189 `http://HOSTNAME:8290`, with `HOSTNAME` being the hostname of your docker host.