forked from 3dbionotes-community/3DBIONOTES
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.development.yml
More file actions
103 lines (98 loc) · 2.79 KB
/
docker-compose.development.yml
File metadata and controls
103 lines (98 loc) · 2.79 KB
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
name: "3dbionotes-ruby"
services:
# Data Base
db:
image: mysql:8.0
container_name: db
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWD}
volumes:
- dbdata:/var/lib/mysql
expose:
- "3306"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
networks:
- bnts-network
# Data Base web interface used during development for easy access to tables and data
pma:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: ${DB_HOST}
PMA_PORT: ${DB_PORT}
PMA_ARBITRARY: 1
restart: always
ports:
- "${PMA_EXT_PORT}:80"
depends_on:
db:
condition: service_healthy
networks:
- bnts-network
# Ruby on Rails
web:
image: ${IMAGE_NAME}
build:
context: .
env_file: .env
container_name: web-ruby
tty: true
command:
- bash
- -c
- |
RAILS_ENV=development bundle exec rake db:migrate &&
RAILS_ENV=development bundle exec rails s -p 3000 -b '0.0.0.0'
depends_on:
db:
condition: service_healthy
volumes:
- bionotes-root:/services/bionotes
- bionotes-data:/services/bionotes/apps/bionotes/data
- bionotes-db:/services/bionotes/apps/bionotes/db
- bionotes-upload:/services/bionotes/apps/bionotes/public/upload
- bionotes-databases:/services/bionotes/databases
- public-assets:/app/public
- .:/services/bionotes/apps/bionotes
expose:
- "3000"
networks:
- bnts-network
# Web server for precompiled assets
nginx:
image: nginx:1.25
container_name: nginx-ruby
depends_on:
- web
ports:
- "${APP_EXT_PORT}:80"
volumes:
- ./nginx/dev.conf.template:/etc/nginx/templates/default.conf.template:ro
- public-assets:/app/public:ro
environment:
- NGINX_PORT=80
networks:
- bnts-network
volumes:
dbdata: null
public-assets:
bionotes-root:
bionotes-data:
bionotes-upload:
bionotes-db:
bionotes-databases:
networks:
bnts-network:
driver: bridge