Skip to content

Commit

Permalink
Rerun lineman when coffee/js assets change
Browse files Browse the repository at this point in the history
This is a hack. Lineman really ought to instead be doing its own
reloading. It watches and compiles the files but doesn't put them in the
right places to be effective. I have not spent the time to learn lineman
well enough to fix it.

Instead as a workaround, restart lineman, because starting lineman puts
everything in its right place.

See exercism#2936 (comment)
  • Loading branch information
nilbus committed Jul 20, 2017
1 parent 9afa8bc commit e072f94
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions docker-compose.yml
@@ -1,4 +1,5 @@
version: '2.1'

services:
app:
extends:
Expand All @@ -21,31 +22,27 @@ services:

RACK_ENV:
DEV_DATABASE_HOST: db

db:
image: postgres:9.4
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: exercism
POSTGRES_PASSWORD: apples

compass:
extends:
file: docker/common.yml
service: app
command: compass watch

# Lineman runs, but it's putting all its compiled code into
# /frontend/generated, which the Ruby app isn't looking at. On
# top of that, it doesn't deal with Docker's SIGTERM in a graceful
# way, which slows down stopping the container, so we'll just leave
# this whole thing disabled for now.

#lineman:
# extends:
# file: docker/common.yml
# service: app
# command: lineman run
# working_dir: /exercism/frontend
lineman:
extends:
file: docker/common.yml
service: app
command: rerun -b --pattern '{**/*.coffee,**/{script,stats}.js}' -- lineman run
working_dir: /exercism/frontend

volumes:
pgdata:
Expand Down

0 comments on commit e072f94

Please sign in to comment.