-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose-dev.yml
129 lines (122 loc) · 3.01 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
#
# This is the dev version of the docker compose
# this is overlaid on the docket compose for dev environments
#
# docker-compose -p draw-dev -f docker-compose-dev.yml up
# docker-compose -p draw-dev -f docker-compose-dev.yml up --build
# docker-compose -p draw-dev -f docker-compose-dev.yml up --build -d
#
# docker volume create --name=draw-db-data
# docker volume create --name=draw-redis-data
# docker volume create --name=draw-node_modules
# docker volume create --name=draw-node_modules_sidekiq
#
version: "3.7"
volumes:
draw-db-data:
external: true
draw-redis-data:
external: true
draw-node_modules:
external: true
draw-node_modules_sidekiq:
external: true
box: {} # used for the bundler, persistent store between runs
services:
draw:
command: /opt/draw/script/draw_start.sh
build:
context: .
dockerfile: Dockerfile-dev
env_file:
- .envrc
environment:
- DB_HOST=draw-db
- RAILS_ENV=development
- NODE_ENV=development
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
- SMTP_SERVER=mailcatcher
- SMTP_PORT=1025
- SIDEKIQ_REDIS_URL=redis://redis:6379/0
volumes:
- draw-node_modules:/opt/draw/node_modules
- .:/opt/draw
- box:/var/bundler
- type: tmpfs
target: /opt/draw/tmp
ports:
- "3000:3000"
- "3035:3035"
depends_on:
- draw-db
# - redis
links:
- draw-db
- mailcatcher
# - redis
# draw-sidekiq:
# command: /opt/draw/script/draw_sidekiq.sh
# build:
# context: .
# dockerfile: Dockerfile-dev
# env_file:
# - .envrc
# environment:
# - DB_HOST=draw-db
# - 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:
# - draw-node_modules_sidekiq:/opt/draw/node_modules
# - .:/opt/draw
# - box:/var/bundler
# - type: tmpfs
# target: /opt/draw/tmp
# depends_on:
# - draw-db
# - redis
# links:
# - redis
# - draw-db
# - mailcatcher
draw-db:
container_name: draw-db
image: mysql:5.7
platform: linux/x86_64
env_file:
- .envrc
volumes:
- draw-db-data:/var/lib/mysql
- ./etc/mysql/conf.d:/etc/mysql/conf.d
ports:
- "3306:3306"
# Used for sidekiq for jobs
redis:
image: redis:alpine
# restart: always
volumes:
- draw-redis-data:/data
ports:
- "6379:6379"
# Use when we move to R6 or greater
# livereload:
# image: draw:dev
# build:
# context: .
# dockerfile: Dockerfile-dev
# command: /opt/draw/script/livereload_start.sh
# ports:
# - 35729:35729
# volumes:
# - .:/opt/draw
# Utility to test mails on local dev machine
mailcatcher:
image: schickling/mailcatcher
entrypoint: "mailcatcher -f --ip 0.0.0.0"
# restart: always
ports:
- 10025:1025
- 1080:1080