Skip to content

Commit

Permalink
run migrations on docker app start
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw committed Jan 28, 2024
1 parent c817499 commit c0f99f0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions compose/app.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
app:
app: &app
build:
context: ../.
# Skip installing development & test gems in production, saves 20s build time.
Expand All @@ -18,6 +18,7 @@ services:
- mqtt-task
- telnet-task
- push
- app-migrations
#- mqtt
restart: always
deploy:
Expand All @@ -34,4 +35,11 @@ services:
logging:
driver: "json-file"
options:
max-size: "100m"
max-size: "100m"
app-migrations:
<<: *app
depends_on:
- db
ports: []
entrypoint: ["bash", "-c", "rake db:migrate"]
restart: no

0 comments on commit c0f99f0

Please sign in to comment.