Skip to content

Commit

Permalink
Auto restart containers if they go down (e.g., on reboot) (#11)
Browse files Browse the repository at this point in the history
* Restart containers automatically (e.g., on reboot)

* Move container name to start of definition
  • Loading branch information
jawrainey authored Mar 19, 2021
1 parent 264ab58 commit 7d6d247
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion instances/inventory/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
snipe-mysql:
container_name: snipe-mysql
image: mysql:5.6
restart: unless-stopped
networks:
- database
env_file:
Expand All @@ -24,11 +25,12 @@ services:
- "traefik.tcp.routers.mysql.entrypoints=mysql"

snipeit:
container_name: snipeit
image: snipe/snipe-it:v4.9.2
restart: unless-stopped
networks:
- web
- database
container_name: snipeit
env_file:
- .snipeit.env
depends_on:
Expand Down
7 changes: 5 additions & 2 deletions instances/middleware/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ networks:

services:
consumer_live:
container_name: consumer_live
image: ideafast/middleware:0.1.0
restart: unless-stopped
networks:
- web
container_name: consumer_live
env_file:
- .consumer.live.env
labels:
Expand All @@ -21,10 +22,11 @@ services:
- "traefik.http.routers.consumer_live.tls.certresolver=leresolver"

consumer_dev:
container_name: consumer_dev
image: ideafast/middleware:0.1.0
restart: unless-stopped
networks:
- web
container_name: consumer_dev
env_file:
- .consumer.dev.env
labels:
Expand All @@ -36,6 +38,7 @@ services:
mongodb:
container_name: mongo
image: mongo:4.4.3
restart: unless-stopped
command: [--auth]
networks:
- database
Expand Down
4 changes: 2 additions & 2 deletions instances/redirects/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ networks:

services:
mbs:
container_name: mbs
image: schmunk42/nginx-redirect
restart: unless-stopped
container_name: mbs
networks:
- web
environment:
Expand All @@ -22,9 +22,9 @@ services:
- "traefik.http.routers.mbs.tls=true"
- "traefik.http.routers.mbs.tls.certresolver=leresolver"
zk1:
container_name: zk1
image: schmunk42/nginx-redirect
restart: unless-stopped
container_name: zk1
networks:
- web
environment:
Expand Down
3 changes: 2 additions & 1 deletion instances/supportdocs/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ networks:

services:
docs:
container_name: docs
image: nginx:alpine
restart: unless-stopped
volumes:
- ./conf:/etc/nginx/conf.d/
- ./docs/_site:/usr/share/nginx/html/
networks:
- web
container_name: docs
labels:
- "traefik.enable=true"
- "traefik.http.routers.docs.rule=Host(`docs.ideafast.eu`)"
Expand Down
1 change: 1 addition & 0 deletions instances/surveys/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
limesurvey:
container_name: limesurvey
image: crramirez/limesurvey:latest
restart: unless-stopped
networks:
- web
- database
Expand Down

0 comments on commit 7d6d247

Please sign in to comment.