Skip to content

Commit

Permalink
Use 'unless-stopped' instead of 'always' for development (#1586)
Browse files Browse the repository at this point in the history
# Description

When developing locally, I am reluctant to start containers with the
`restart: always` option. I find they stick around longer than I want
them to. In my opinion, `restart: unless-stopped` is a nice middle
ground.

## Checklist before requesting a review

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
  • Loading branch information
charlesbrandt authored Nov 4, 2023
1 parent 0d3e925 commit b5cf350
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- /app/node_modules
- /app/.next
container_name: web
restart: always
restart: unless-stopped
ports:
- 3000:3000

Expand All @@ -25,7 +25,7 @@ services:
args:
- DEV_MODE=true
container_name: backend-core
restart: always
restart: unless-stopped
volumes:
- ./backend/:/code/
depends_on:
Expand All @@ -38,7 +38,7 @@ services:
redis:
image: redis:latest
container_name: redis
restart: always
restart: unless-stopped
ports:
- 6379:6379

Expand All @@ -50,7 +50,7 @@ services:
dockerfile: Dockerfile
container_name: worker
command: celery -A celery_worker worker -l info
restart: always
restart: unless-stopped
depends_on:
- redis
volumes:
Expand All @@ -64,7 +64,7 @@ services:
dockerfile: Dockerfile
container_name: flower
command: celery -A celery_worker flower -l info --port=5555
restart: always
restart: unless-stopped
volumes:
- ./backend/:/code/
depends_on:
Expand Down

0 comments on commit b5cf350

Please sign in to comment.