Skip to content

Commit

Permalink
HPF-18 Changes for running HOMS in docker ecosystem (#81)
Browse files Browse the repository at this point in the history
* sync imprint.yml.sample with imprint.default.yml;
 * add common network;
 * add volume for config;
 * add volumes for databases.
  • Loading branch information
sugarfree1 committed Feb 22, 2018
1 parent 6251acc commit 0f83f73
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 4 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,24 @@ There are 2 ways to install homs.
```
wget https://raw.githubusercontent.com/latera/homs-docker/master/docker-compose.yml
```
3. Run `docker-compose`:
3. Create directories for db datafiles:

```
mkdir -p /var/lib/hydra/activiti/postgresql
mkdir -p /var/lib/hydra/homs/postgresql
```
4. For OS X users: add `/var/lib/hydra/activiti/postgresql` and `/var/lib/hydra/homs/postgresql` in `Docker -> Preferences... -> File Sharing`.
5. Copy your (or default) configs to `/etc/hydra/homs/`:

```
cp activiti.yml /etc/hydra/homs/activiti.yml
cp database.yml /etc/hydra/homs/database.yml
cp hbw.yml /etc/hydra/homs/hbw.yml
cp homs_configuration.yml /etc/hydra/homs/homs_configuration.yml
cp imprint.yml /etc/hydra/homs/imprint.yml
cp sources.yml /etc/hydra/homs/sources.yml
```
6. Run `docker-compose`:
```
docker-compose up -d
```
Expand Down
6 changes: 3 additions & 3 deletions config/imprint.yml.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
development: &development
base_url: http://localhost:2300/api/
auth_token: auth_token
x_imprint_api_version: 1
base_url: 'http://localhost:2300/api/'
auth_token: 'changeme'
api_version: '1'

staging:
<<: *development
Expand Down
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@ version: '2'
services:
db_activiti:
image: latera/postgres-activiti
hostname: postgres-activiti
container_name: postgres-activiti
restart: always
environment:
PGDATA: /var/lib/postgresql/data/activiti/
POSTGRES_USER: activiti
TZ: Europe/Moscow
volumes:
- /var/lib/hydra/activiti/postgresql:/var/lib/postgresql/data
networks:
- custom_network
db_homs:
image: latera/postgres-homs
hostname: postgres-homs
container_name: postgres-homs
environment:
PGDATA: /var/lib/postgresql/data/homs
POSTGRES_USER: homs
TZ: Europe/Moscow
volumes:
- /var/lib/hydra/homs/postgresql:/var/lib/postgresql/data
networks:
- custom_network
activiti_homs:
image: latera/activiti-homs
container_name: activiti
Expand All @@ -16,14 +35,33 @@ services:
- HOMS_HOST=homs
ports:
- 8080:8080
depends_on:
- db_activiti
networks:
- custom_network
homs:
image: latera/homs
container_name: homs
links:
- db_homs:postgres-homs
- activiti_homs:activiti
volumes:
- /etc/hydra/homs/homs_configuration.yml:/opt/homs/config/homs_configuration.yml
- /etc/hydra/homs/imprint.yml:/opt/homs/config/imprint.yml
- /etc/hydra/homs/hbw.yml:/opt/homs/config/hbw.yml
- /etc/hydra/homs/database.yml:/opt/homs/config/database.yml
- /etc/hydra/homs/activiti.yml:/opt/homs/config/activiti.yml
- /etc/hydra/homs/sources.yml:/opt/homs/config/sources.yml
environment:
- ACTIVITI_HOST=activiti
- DB_HOST=postgres-homs
depends_on:
- db_homs
- activiti_homs
ports:
- 3000:3000
networks:
- custom_network
networks:
custom_network:
driver: bridge

0 comments on commit 0f83f73

Please sign in to comment.