-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose-dev.yml
132 lines (125 loc) · 3.08 KB
/
docker-compose-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#
# This is the dev version of the docker compose
# this is overlaid on the docket compose for dev environments
#
# NOTE:
# You will need to create volumes for the data to be persistent between runs
# docker volume create --name=pgdata
# docker volume create --name=redis-data
# docker volume create --name=node_modules
# docker volume create --name=node_modules_sidekiq
#
# NOTE:
# start the docker containers:
# docker-compose -p plano-dev -f docker-compose-dev.yml up
# build and start the docker containers:
# docker-compose -p plano-dev -f docker-compose-dev.yml up --build
# build and start the docker containers and detach the processes:
# docker-compose -p plano-dev -f docker-compose-dev.yml up --build -d
#
version: "3.7"
volumes:
pgdata:
external: true
redis-data:
external: true
node_modules:
external: true
node_modules_sidekiq:
external: true
box: {} # used for the bundler, persistent store between runs
services:
planorama:
command: /opt/planorama/script/planorama_start.sh
build:
context: .
dockerfile: Dockerfile-dev
env_file:
- .envrc
environment:
- DB_HOST=postgres
- RAILS_ENV=development
- NODE_ENV=development
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
- SIDEKIQ_REDIS_URL=redis://redis:6379/0
- SMTP_SERVER=mailcatcher
- SMTP_PORT=1025
volumes:
- node_modules:/opt/planorama/node_modules
- .:/opt/planorama
- box:/var/bundler
- type: tmpfs
target: /opt/planorama/tmp
ports:
- "3000:3000"
- "3035:3035"
depends_on:
- postgres
- redis
links:
- redis
- postgres
- mailcatcher
planorama-sidekiq:
command: /opt/planorama/script/planorama_sidekiq.sh
build:
context: .
dockerfile: Dockerfile-dev
env_file:
- .envrc
environment:
- DB_HOST=postgres
- RAILS_ENV=development
- NODE_ENV=development
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
- SIDEKIQ_REDIS_URL=redis://redis:6379/0
- SMTP_SERVER=mailcatcher
- SMTP_PORT=1025
volumes:
- node_modules_sidekiq:/opt/planorama/node_modules
- .:/opt/planorama
- box:/var/bundler
- type: tmpfs
target: /opt/planorama/tmp
depends_on:
- postgres
- redis
links:
- redis
- postgres
- mailcatcher
# The database server - only needed for dev and test
# The Postgre DB
postgres:
image: postgres:12-alpine
restart: always
env_file:
- .envrc
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:alpine
restart: always
volumes:
- redis-data:/data
ports:
- "6379:6379"
livereload:
image: planorama:dev
build:
context: .
dockerfile: Dockerfile-dev
command: /opt/planorama/script/livereload_start.sh
ports:
- 35729:35729
volumes:
- .:/opt/planorama
mailcatcher:
image: schickling/mailcatcher
entrypoint: "mailcatcher -f --ip 0.0.0.0"
restart: always
ports:
- 10025:1025
- 1080:1080