forked from ComPlat/chemotion_ELN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
67 lines (64 loc) · 2.13 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
# This docker-compose file sets up the dev environment.
# It builds an app container based on Dockerfile.chemotion.dev
#
# USAGE:
# - Run development environment:
# docker-compose -f docker-compose.dev.yml up postgres app webpacker
# - Open a bash shell in the app container:
# docker exec -it NAME_OF_APP_CONTAINER_FROM_DOCKER_PS /bin/bash
# - Setup the database environment inside the bash shell:
# bundle exec rake db:setup
# - Run tests:
# bundle exec rspec
#
services:
postgres:
image: 'postgres:14'
environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
expose: # expose port to app container
- '5432'
ports: # expose port to host machine in case we want to use external db gui tools
- '5432:5432'
volumes:
- 'database:/var/lib/postgresql/data'
app:
build:
context: '.'
dockerfile: 'Dockerfile.chemotion-dev'
depends_on:
- 'postgres'
environment:
- 'WEBPACKER_DEV_SERVER_HOST=webpacker'
- 'WEBPACKER_DEV_SERVER_PORT=3035'
- 'NODE_MODULES_PATH=/home/chemotion-dev/node_modules/' # required for the asset pipeline to find the node modules
- 'THOR_SILENCE_DEPRECATION=true'
ports: # expose default rails port to host machine
- "3000:3000"
volumes:
- 'homedir:/home/chemotion-dev/'
- '.:/home/chemotion-dev/app'
working_dir: "/home/chemotion-dev/app"
command: "./run-ruby-dev.sh"
webpacker:
build:
context: '.'
dockerfile: 'Dockerfile.chemotion-dev'
environment:
- 'WEBPACKER_DEV_SERVER_HOST=webpacker'
- 'WEBPACKER_DEV_SERVER_PORT=3035'
- 'NODE_MODULES_PATH=/home/chemotion-dev/node_modules/' # required for the asset pipeline to find the node modules
- 'WEBPACKER_NODE_MODULES_BIN_PATH=/node_modules/.bin' # required for webpacker to find the yarn binary
env_file: ./.env
volumes:
- 'homedir:/home/chemotion-dev/'
- '.:/home/chemotion-dev/app'
ports: # expose webpacker dev server port to app container
- '3035:3035'
expose:
- '3035'
working_dir: "/home/chemotion-dev/app"
command: './run-js-dev.sh'
volumes:
database:
homedir: