fix(docker): add .dockerignore, fix Dockerfile apt cleanup, simplify mysql healthcheck

main
Boban Blaskovic 2026-05-22 00:28:03 +02:00
parent 8eb1759d7e
commit 2fcd7c985e
3 changed files with 13 additions and 2 deletions

10
.dockerignore Normal file
View File

@ -0,0 +1,10 @@
.git
.env
node_modules
vendor
storage/logs
storage/framework/cache
docker
tests
*.md
.github

View File

@ -86,7 +86,7 @@ services:
volumes: volumes:
- mysql_data:/var/lib/mysql - mysql_data:/var/lib/mysql
healthcheck: healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "${DB_USERNAME}", "-p${DB_PASSWORD}"] test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 10 retries: 10

View File

@ -9,7 +9,8 @@ RUN apt-get update && apt-get install -y \
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs && apt-get install -y nodejs \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/html WORKDIR /var/www/html
COPY . . COPY . .