Skip to content

Commit 3375c1e

Browse files
committed
docker-compose: avoid to keep database started always on the PC
The always option caused the database and redis containers to start even if the developper was not working on the code. To avoid to consume computer resources uselessly, we ask to not restart if container was stopped.
1 parent 41dd128 commit 3375c1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
image: mariadb:10.1
6060
env_file:
6161
- deployment/default.env
62-
restart: always
62+
restart: unless-stopped
6363
volumes:
6464
- data-database:/var/lib/mysql
6565

@@ -69,14 +69,14 @@ services:
6969
- deployment/default.env
7070
entrypoint: ["/linuxfr-entrypoint.sh"]
7171
command: ["mysqld"]
72-
restart: always
72+
restart: unless-stopped
7373
volumes:
7474
- data-database-test:/var/lib/mysql
7575
- ./deployment/database-test/entrypoint.sh:/linuxfr-entrypoint.sh
7676

7777
redis:
7878
image: redis:5
79-
restart: always
79+
restart: unless-stopped
8080
volumes:
8181
- data-redis:/data
8282

0 commit comments

Comments
 (0)