Skip to content

Commit 346ea72

Browse files
author
Vidas P
committed
Add docker-compose that uses source code
1 parent b805331 commit 346ea72

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

docker/docker-compose.local.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
version: '3'
2+
3+
volumes:
4+
postgresdata:
5+
6+
services:
7+
postgres:
8+
image: docker.io/postgres:9.6-alpine
9+
volumes:
10+
- postgresdata:/var/lib/postgresql/data
11+
environment:
12+
POSTGRES_PASSWORD: myactiveworkflowpassword
13+
POSTGRES_USER: active_workflow
14+
ports:
15+
- 5432:5432
16+
17+
active_workflow_web:
18+
build:
19+
context: ../
20+
dockerfile: Dockerfile
21+
env_file:
22+
- ../.env
23+
environment:
24+
RAILS_ENV: 'production'
25+
DATABASE_HOST: 'postgres'
26+
DATABASE_NAME: 'active_workflow'
27+
DATABASE_USERNAME: 'active_workflow'
28+
DATABASE_PASSWORD: 'myactiveworkflowpassword'
29+
ports:
30+
- 3000:3000
31+
links:
32+
- postgres
33+
command: /scripts/init
34+
35+
active_workflow_scheduler:
36+
build:
37+
context: ../
38+
dockerfile: Dockerfile
39+
env_file:
40+
- ../.env
41+
environment:
42+
RAILS_ENV: 'production'
43+
DATABASE_HOST: 'postgres'
44+
DATABASE_NAME: 'active_workflow'
45+
DATABASE_USERNAME: 'active_workflow'
46+
DATABASE_PASSWORD: 'myactiveworkflowpassword'
47+
links:
48+
- postgres
49+
command: bundle exec rails runner bin/scheduler.rb
50+
51+
active_workflow_worker:
52+
build:
53+
context: ../
54+
dockerfile: Dockerfile
55+
env_file:
56+
- ../.env
57+
environment:
58+
RAILS_ENV: 'production'
59+
DATABASE_HOST: 'postgres'
60+
DATABASE_NAME: 'active_workflow'
61+
DATABASE_USERNAME: 'active_workflow'
62+
DATABASE_PASSWORD: 'myactiveworkflowpassword'
63+
links:
64+
- postgres
65+
command: bundle exec script/delayed_job -n 2 run

docker/test/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ volumes:
55

66
services:
77
postgres:
8-
image: postgres:9.5-alpine
8+
image: postgres:9.6-alpine
99
volumes:
1010
- postgresdata:/var/lib/postgresql/data
1111
environment:

0 commit comments

Comments
 (0)