Skip to content

Commit 0717e0c

Browse files
Ananya MaitiAnanya Maiti
Ananya Maiti
authored and
Ananya Maiti
committed
Add restart:always to containers
1 parent f24de39 commit 0717e0c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docker-compose.prod.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
image: postgres:15-alpine
66
ports:
77
- "5432:5432"
8+
restart: always
89
volumes:
910
- postgres_data:/var/lib/postgresql/data/
1011
env_file:
@@ -14,13 +15,15 @@ services:
1415
image: redis:latest
1516
ports:
1617
- "6379:6379"
18+
restart: always
1719

1820
web:
1921
image: ananyo2012/junction:1.1
2022
volumes:
2123
- .:/code
2224
ports:
2325
- "${SERVER_PORT}:${SERVER_PORT}"
26+
restart: always
2427
depends_on:
2528
- db
2629
env_file:
@@ -33,6 +36,7 @@ services:
3336
- db
3437
- redis
3538
- web
39+
restart: always
3640
env_file:
3741
- .env
3842
command: sh -c 'celery -A junction worker -l info -E'

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
image: postgres:15-alpine
66
ports:
77
- "5432:5432"
8+
restart: always
89
volumes:
910
- postgres_data:/var/lib/postgresql/data/
1011
env_file:
@@ -14,6 +15,7 @@ services:
1415
image: redis:latest
1516
ports:
1617
- "6379:6379"
18+
restart: always
1719

1820
web:
1921
build:
@@ -24,6 +26,7 @@ services:
2426
- .:/code
2527
ports:
2628
- "${SERVER_PORT}:${SERVER_PORT}"
29+
restart: always
2730
depends_on:
2831
- db
2932
env_file:
@@ -36,6 +39,7 @@ services:
3639
- db
3740
- redis
3841
- web
42+
restart: always
3943
env_file:
4044
- .env
4145
command: sh -c 'celery -A junction worker -l info -E'

0 commit comments

Comments
 (0)