Skip to content

Commit 1ba3e71

Browse files
committed
build: removed persistent env and container auto-restart
1 parent d45de2f commit 1ba3e71

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

containers/php/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
set -e
44

5+
if [ -f .env ]; then
6+
. .env
7+
fi
8+
59
wait_for_php_fpm() {
610
wait-for "${PHP_HOST:?Missing PHP_HOST}:${PHP_PORT:?Missing PHP_PORT}" -t 60
711
}

docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,21 @@ x-app: &app
66
args:
77
UID: ${UID:-1000}
88
GID: ${GID:-1000}
9-
restart: unless-stopped
9+
restart: on-failure
1010
depends_on:
1111
- redis
1212
extra_hosts:
1313
- "host.docker.internal:host-gateway"
1414
volumes:
1515
- /etc/localtime:/etc/localtime:ro
1616
- .:/var/www/html
17-
env_file:
18-
- .env
1917

2018
services:
2119
nginx:
2220
pull_policy: never
2321
build:
2422
dockerfile: containers/nginx/Dockerfile
25-
restart: unless-stopped
23+
restart: on-failure
2624
ports:
2725
- "8080:80"
2826
volumes:
@@ -66,7 +64,7 @@ services:
6664
start_period: 5s
6765
redis:
6866
image: redis:8.2.3-alpine
69-
restart: unless-stopped
67+
restart: on-failure
7068
ports:
7169
- "6379:6379"
7270
testing:

0 commit comments

Comments
 (0)