Skip to content

Commit

Permalink
docker-compose version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagotalma committed Sep 14, 2016
1 parent 7550274 commit 5182a09
Showing 3 changed files with 129 additions and 101 deletions.
72 changes: 41 additions & 31 deletions docker/single-process/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
mysqldata:
image: mysql:5.7
command: /bin/true
# This needs at least compose 1.6.0
version: '2'

mysql:
image: mysql:5.7
volumes_from:
- mysqldata
environment:
MYSQL_ROOT_PASSWORD: myrootpassword
MYSQL_DATABASE: huginn
MYSQL_USER: huginn
MYSQL_PASSWORD: myhuginnpassword
services:
mysqldata:
image: mysql:5.7
command: /bin/true

huginn_web:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
ports:
- 3000:3000
links:
- mysql
mysql:
image: mysql:5.7
volumes_from:
- mysqldata
environment:
MYSQL_ROOT_PASSWORD: myrootpassword
MYSQL_DATABASE: huginn
MYSQL_USER: huginn
MYSQL_PASSWORD: myhuginnpassword

huginn_threaded:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
links:
- mysql
command: /scripts/init bin/threaded.rb
huginn_web:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
ports:
- 3000:3000
links:
- mysql
environment:
MYSQL_PORT_3306_TCP_ADDR: mysql
MYSQL_PORT_3306_TCP_PORT: 3306

huginn_threaded:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
links:
- mysql
command: /scripts/init bin/threaded.rb
environment:
MYSQL_PORT_3306_TCP_ADDR: mysql
MYSQL_PORT_3306_TCP_PORT: 3306

18 changes: 11 additions & 7 deletions docker/single-process/environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
huginn_base:
environment:
DATABASE_ADAPTER: mysql2
DATABASE_NAME: huginn
DATABASE_USERNAME: huginn
DATABASE_PASSWORD: myhuginnpassword
APP_SECRET_TOKEN: 3bd139f9186b31a85336bb89cd1a1337078921134b2f48e022fd09c234d764d3e19b018b2ab789c6e0e04a1ac9e3365116368049660234c2038dc9990513d49c
# This needs at least compose 1.6.0
version: '2'

services:
huginn_base:
environment:
DATABASE_ADAPTER: mysql2
DATABASE_NAME: huginn
DATABASE_USERNAME: huginn
DATABASE_PASSWORD: myhuginnpassword
APP_SECRET_TOKEN: 3bd139f9186b31a85336bb89cd1a1337078921134b2f48e022fd09c234d764d3e19b018b2ab789c6e0e04a1ac9e3365116368049660234c2038dc9990513d49c
140 changes: 77 additions & 63 deletions docker/single-process/postgresql.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,86 @@
postgresdata:
image: postgres:9.5
command: /bin/true
# This needs at least compose 1.6.0
version: '2'

postgres:
image: postgres:9.5
volumes_from:
- postgresdata
environment:
POSTGRES_PASSWORD: myhuginnpassword
POSTGRES_USER: huginn
services:
postgresdata:
image: postgres:9.5
command: /bin/true

huginn_web:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
environment:
DATABASE_ADAPTER: postgresql
ports:
- 3000:3000
links:
- postgres
postgres:
image: postgres:9.5
volumes_from:
- postgresdata
environment:
POSTGRES_PASSWORD: myhuginnpassword
POSTGRES_USER: huginn

huginn_threaded:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
environment:
DATABASE_ADAPTER: postgresql
links:
- postgres
command: /scripts/init bin/threaded.rb
huginn_web:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
environment:
DATABASE_ADAPTER: postgresql
POSTGRES_PORT_5432_TCP_ADDR: postgres
POSTGRES_PORT_5432_TCP_PORT: 5432
ports:
- 3000:3000
links:
- postgres

# huginn_schedule:
# image: cantino/huginn-single-process
# extends:
# file: environment.yml
# service: huginn_base
# environment:
# DATABASE_ADAPTER: postgresql
# links:
# - postgres
# command: /scripts/init bin/schedule.rb
huginn_threaded:
image: cantino/huginn-single-process
restart: always
extends:
file: environment.yml
service: huginn_base
environment:
DATABASE_ADAPTER: postgresql
POSTGRES_PORT_5432_TCP_ADDR: postgres
POSTGRES_PORT_5432_TCP_PORT: 5432
links:
- postgres
command: /scripts/init bin/threaded.rb

# huginn_schedule:
# image: cantino/huginn-single-process
# extends:
# file: environment.yml
# service: huginn_base
# environment:
# DATABASE_ADAPTER: postgresql
# POSTGRES_PORT_5432_TCP_ADDR: postgres
# POSTGRES_PORT_5432_TCP_PORT: 5432
# links:
# - postgres
# command: /scripts/init bin/schedule.rb

# huginn_twitter_stream:
# image: cantino/huginn-single-process
# extends:
# file: environment.yml
# service: huginn_base
# environment:
# DATABASE_ADAPTER: postgresql
# links:
# - postgres
# command: /scripts/init bin/twitter_stream.rb

# huginn_twitter_stream:
# image: cantino/huginn-single-process
# extends:
# file: environment.yml
# service: huginn_base
# environment:
# DATABASE_ADAPTER: postgresql
# POSTGRES_PORT_5432_TCP_ADDR: postgres
# POSTGRES_PORT_5432_TCP_PORT: 5432
# links:
# - postgres
# command: /scripts/init bin/twitter_stream.rb

# huginn_dj1:
# image: cantino/huginn-single-process
# extends:
# file: environment.yml
# service: huginn_base
# environment:
# DATABASE_ADAPTER: postgresql
# links:
# - postgres
# command: /scripts/init script/delayed_job run

# huginn_dj1:
# image: cantino/huginn-single-process
# extends:
# file: environment.yml
# service: huginn_base
# environment:
# DATABASE_ADAPTER: postgresql
# POSTGRES_PORT_5432_TCP_ADDR: postgres
# POSTGRES_PORT_5432_TCP_PORT: 5432
# links:
# - postgres
# command: /scripts/init script/delayed_job run

0 comments on commit 5182a09

Please sign in to comment.