forked from doubtfire-lms/dream-big
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
49 lines (46 loc) · 1.25 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
version: '3'
services:
api:
image: api:latest
container_name: dream-big-api
build: ./dream-big-api
ports:
- "3000:3000"
volumes:
- ./dream-big-api:/api
depends_on:
- dev-db
environment:
RAILS_ENV: 'development'
DEV_DB_DATABASE: 'dream_big_api_development'
TEST_DB_DATABASE: 'dream_big_api_test'
DEV_DB_USERNAME: dream
DEV_DB_PASSWORD: pwd
DEV_DB_HOST: dream-big-dev-db
command:
/bin/bash -c 'rm -f /api/tmp/pids/server.pid && bundle install && rails db:migrate RAILS_ENV=test && rails db:migrate && rails s -b 0.0.0.0'
# ui:
# image: ui:latest
# container_name: dream-big-ui
# build: ./dream-big-ui
# ports:
# - "4200:4200"
# volumes:
# - ./dream-big-ui:/dream-big-ui
# depends_on:
# - api
# command:
# /bin/bash -c 'npm install; npm start'
dev-db:
container_name: dream-big-dev-db
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: pwd
MYSQL_DATABASE: dream_big_api_development
MYSQL_USER: dream
MYSQL_PASSWORD: pwd
ports:
- "3306:3306"
volumes:
- ./db-init:/docker-entrypoint-initdb.d
# - ./data/database:/var/lib/mysql