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.
@@ -53,14 +53,11 @@ To start the Hitobito application, run the following commands in your shell:
53
53
```bash
54
54
# Start the application
55
55
docker-compose up app
56
-
57
-
# Open the app:
58
-
echo"http://$(docker-compose port app 3000)"
59
-
60
-
# In order to "receive" emails, open mailcatcher:
61
-
echo"http://$(docker-compose port mail 1080)"
62
56
```
63
57
58
+
You can open the app in your browser under [http://localhost:3000].
59
+
In order to "receive" emails, you can open mailcatcher under [http://localhost:1080].
60
+
64
61
It will initially take a while to prepare the initial Docker images, to prepare the database and to start the application.
65
62
The process will be shorter on subsequent starts.
66
63
@@ -69,7 +66,7 @@ The process will be shorter on subsequent starts.
69
66
Get the login information via the Rails console.
70
67
71
68
```bash
72
-
echo'p=Person.first; p.update(password: "password"); "You can now login as #{p.email} with the password \"password\""'| \
69
+
echo'p=Person.first; p.update(password: "password"); "You can now login under http://localhost:3000 as #{p.email} with the password \'password\'"' | \
73
70
docker-compose run --rm -T app rails c
74
71
```
75
72
@@ -84,6 +81,8 @@ Run the following command, to open it.
84
81
docker-compose exec app rails c
85
82
```
86
83
84
+
Also, you can use any IDE which supports the ruby-debug-ide gem (such as RubyMine or NetBeans) to debug the app running in the Docker container.
85
+
87
86
## Test
88
87
89
88
The hitobito application has a lot of rspec tests.
@@ -147,20 +146,8 @@ This method is also not too bad if your working environment got screwed up someh
147
146
148
147
Here follows a dicussion about why certain things were done a certain way in this repository.
149
148
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
149
### Mounts
163
150
164
151
The current directy is mounted by _docker-compose_ into the running containers.
165
152
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.
153
+
I.e. you don't have to re-build the Docker images after every code change.
0 commit comments