-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (56 loc) · 1.28 KB
/
docker-compose.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
version: '3'
services:
sample_app:
build:
context: .
dockerfile: ./Dockerfile
working_dir: /app
container_name: locked_app_sample
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -b 0.0.0.0 -p 3232"
ports:
- '3232:3232'
volumes:
- .:/app
- bundle:/app/vendor/bundle
- ./.bashrc:/root/.bashrc
- ./.pryrc:/root/.pryrc
links:
- mysqld
depends_on:
- mysqld
tty: true
stdin_open: true
environment:
RAILS_DATABASE_USERNAME: root
RAILS_DATABASE_PASSWORD: root
RAILS_DATABASE_HOST: mysqld
RAILS_DATABASE_NAME: locked_dev
RAILS_DATABASE_PORT: 3306
BUNDLE_PATH: /app/vendor/bundle
DOCKER_USE: 1
LOCKED_RUBY_DEV_MODE: 'on'
mysqld:
image: mysql:5.7
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
environment:
MYSQL_DATABASE: 'locked_dev'
MYSQL_ROOT_PASSWORD: 'root'
ports:
- "${HOST_PORT_MYSQL}:3306"
volumes:
- mysqld-volume:/var/lib/mysql
volumes:
rails_public:
driver: local
bundle:
driver: local
rails_log:
driver: local
mysqld-volume:
driver: local
node_cache:
driver: local
networks:
default:
external:
name: locked-api_default