Mercurial > gemma
annotate docker/README.md @ 2462:9ae2a2f758bb
client: make use of new table header/body components
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 04 Mar 2019 14:50:23 +0100 |
parents | b6b699385302 |
children | 7ebd4154894e |
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 | 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 | 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 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
100 Get a running instance with e.g.: |
101 | 101 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
102 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
103 docker run --name gemma_db -d -p 54321:5432 -v $PWD/schema:/opt/gemma \ |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
104 --network gemma gemma_db |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
105 ``` |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
106 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
107 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
|
108 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
109 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
|
110 policies: |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
111 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
112 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
113 docker exec gemma_db ./run_tests.sh |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
114 ``` |
524
156a805941b5
Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents:
174
diff
changeset
|
115 |
2163
b6b699385302
Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents:
2142
diff
changeset
|
116 ### Create ER diagrams |
83 | 117 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
118 Assuming you have installed `postgresql-autodoc` and |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
119 [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
|
120 docker host, you can use the following: |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
121 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
122 ER diagram with waterway related tables: |
83 | 123 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
124 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
125 postgresql_autodoc -p 54321 -h $dockerhost \ |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
126 -d gemma -U sophie --password=so2Phie4 \ |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
127 -t dot -l . -s 'waterway' |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
128 dot -Tpdf gemma.dot > gemma_waterway.pdf |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
129 ``` |
524
156a805941b5
Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents:
174
diff
changeset
|
130 |
156a805941b5
Move docker stuff from schema to dedicated docker directory
Tom Gottfried <tom@intevation.de>
parents:
174
diff
changeset
|
131 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
|
132 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
|
133 |
2163
b6b699385302
Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents:
2142
diff
changeset
|
134 ### GeoServer setup |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
524
diff
changeset
|
135 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
136 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
|
137 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
138 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
139 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
|
140 ``` |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
141 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
142 Get a running instance with e.g.: |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
524
diff
changeset
|
143 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
144 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
145 docker run --name gemma_geoserver -d -p 8280:8080 --network gemma \ |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
146 gemma_geoserver |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
147 ``` |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
148 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
149 Use `--network-alias gemma_geoserver` if you give your container |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
150 a different name. |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
524
diff
changeset
|
151 |
2163
b6b699385302
Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents:
2142
diff
changeset
|
152 ### Gemma backend setup |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
524
diff
changeset
|
153 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
154 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
|
155 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
156 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
157 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
|
158 ``` |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
159 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
160 Get a running instance with e.g.: |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
524
diff
changeset
|
161 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
162 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
163 docker run --name gemma_backend -v $PWD:/opt/gemma -d -p 8200:8000 \ |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
164 --network gemma gemma_backend |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
165 ``` |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
166 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
167 Use `--network-alias gemma_backend` if you give your container |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
168 a different name. |
596
6d7c0dbf9d21
Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents:
561
diff
changeset
|
169 |
2163
b6b699385302
Added docker compose support.
Bjoern Schilberg <bjoern@intevation.de>
parents:
2142
diff
changeset
|
170 ### SPA setup |
596
6d7c0dbf9d21
Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents:
561
diff
changeset
|
171 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
172 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
|
173 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
174 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
175 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
|
176 ``` |
596
6d7c0dbf9d21
Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents:
561
diff
changeset
|
177 |
2142
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
178 Get a running instance with e.g.: |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
179 |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
180 ```shell |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
181 docker run --name gemma_spa -v $PWD/client:/opt/gemma/client -d -p 8290:8080 \ |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
182 --network gemma gemma_spa |
70471052f6b0
docker/README.md: Formatting, typos and concretizations.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1982
diff
changeset
|
183 ``` |
596
6d7c0dbf9d21
Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents:
561
diff
changeset
|
184 |
6d7c0dbf9d21
Fix running client container with clean checkout in volume
Tom Gottfried <tom@intevation.de>
parents:
561
diff
changeset
|
185 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
|
186 `http://HOSTNAME:8290`, with `HOSTNAME` being the hostname of your docker host. |