You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 27, 2021. It is now read-only.
@@ -19,19 +37,18 @@ You need to set up at least one wagon project.
19
37
The final structure should look something like this:
20
38
21
39
```bash
22
-
$ ls -l
40
+
$ ls -lh
23
41
total 16K
24
42
-rw-r--r-- 1 user 1.3K Jul 15 10:57 Dockerfile
25
43
-rw-r--r-- 1 user 1.4K Jul 15 17:43 README.md
26
44
-rw-r--r-- 1 user 625 Jul 15 17:41 docker-compose.yml
27
45
drwxr-xr-x 36 user 1.2K Jul 15 13:56 hitobito
28
46
drwxr-xr-x 27 user 864 Jun 11 09:30 hitobito_generic
29
-
drwxr-xr-x 29 user 928 Jul 15 09:43 hitobito_insieme
30
47
```
31
48
32
49
## Docker Runtime
33
50
34
-
The simplest way to work on hitobito is to use Docker:
51
+
To start the Hitobito application, run the following commands in your shell:
35
52
36
53
```bash
37
54
# Start the application
@@ -44,17 +61,8 @@ echo "http://$(docker-compose port app 3000)"
44
61
echo"http://$(docker-compose port mail 1080)"
45
62
```
46
63
47
-
### Exposed Ports
48
-
49
-
The `docker-compose.yml` file does expose all relevant ports.
50
-
But it does not assign them a well-known port.
51
-
This means, that it is _intentionally_ not possible to access the main application using `http://localhost:3000`!
52
-
Either you use `docker-compose ps` (or the `docker-compose port SERVICE PORTNUMBER` command) to get the actual port Docker assigned – or you use something like [Reception](https://github.com/nxt-engineering/reception).
53
-
54
-
Why would you need this _Reception_ thingy? Because it makes all the services accessible through a reverse proxy that is accessible using `http://SERVICENAME.PROJECTNAME.docker` (or `http://SERVICENAME.PROJECTNAME.local` on Linux).
55
-
This makes work more convenient and allows to have multiple projects, that all bind to the same port (e.g. `3000`), running at the same time.
56
-
(Because Docker will handle the port conflict for us.)
57
-
As an extra you get an overview over all running services and their exposed ports for free at `http://reception.docker` (or `http://reception.local` on linux).
64
+
It will initially take a while to prepare the initial Docker images, to prepare the database and to start the application.
65
+
The process will be shorter on subsequent starts.
58
66
59
67
## First Login
60
68
@@ -124,3 +132,35 @@ docker-compose up sphinx
124
132
125
133
The server does not automatically re-index.
126
134
In order to re-index, run the indexer again.
135
+
136
+
## Clean up / Reset
137
+
138
+
Once you've made your changes and decide to stop working on the project, you should clean up. The following command will remove all data that was created by Docker and _docker-compose_.
139
+
140
+
```bash
141
+
docker-compose down --volumes --remove-orphans --rmi local
142
+
```
143
+
144
+
This method is also not too bad if your working environment got screwed up somehow and you'd like to try a fresh start.
145
+
146
+
## Internals
147
+
148
+
Here follows a dicussion about why certain things were done a certain way in this repository.
149
+
150
+
### Exposed Ports
151
+
152
+
The `docker-compose.yml` file does expose all relevant ports.
153
+
But it does not assign them a well-known port.
154
+
This means, that it is _intentionally_ not possible to access the main application using `http://localhost:3000`!
155
+
Either you use `docker-compose ps` (or the `docker-compose port SERVICE PORTNUMBER` command) to get the actual port Docker assigned – or you use something like [Reception](https://github.com/nxt-engineering/reception).
156
+
157
+
Why would you need this _Reception_ thingy? Because it makes all the services accessible through a reverse proxy that is accessible using `http://SERVICENAME.PROJECTNAME.docker` (or `http://SERVICENAME.PROJECTNAME.local` on Linux).
158
+
This makes work more convenient and allows to have multiple projects, that all bind to the same port (e.g. `3000`), running at the same time.
159
+
(Because Docker will handle the port conflict for us.)
160
+
As an extra you get an overview over all running services and their exposed ports for free at `http://reception.docker` (or `http://reception.local` on linux).
161
+
162
+
### Mounts
163
+
164
+
The current directy is mounted by _docker-compose_ into the running containers.
165
+
The main advantage is a much simpler workflow, because it allows you to change your 'local' files and they are immediately picked up by the commands in the server.
166
+
I.e. you don't have to re-build the Docker images after every time.
0 commit comments