fix: build
This commit is contained in:
1 parent
4ae6948b03
commit
341c1d2fa8
2 files changed
+7
-9
No files matched your search
+5
-1
@@ -10,7 +10,7 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# -------- 2) App source --------
|
# -------- 2) App source --------
|
||||||
FROM alpine:3.20 AS app_src
|
FROM alpine:3.22 AS app_src
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
@@ -88,6 +88,10 @@ php -r "unlink('composer-setup.php');"
|
|||||||
RUN apk add --no-cache nodejs npm
|
RUN apk add --no-cache nodejs npm
|
||||||
RUN composer run setup
|
RUN composer run setup
|
||||||
|
|
||||||
|
# Ensure the .env file is not copied into the image
|
||||||
|
# Add this line to explicitly remove the .env file if it exists
|
||||||
|
RUN rm -f /var/www/html/.env
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --retries=5 \
|
HEALTHCHECK --interval=30s --timeout=5s --retries=5 \
|
||||||
CMD curl -fsS http://localhost/healthz || exit 10
|
CMD curl -fsS http://localhost/healthz || exit 10
|
||||||
|
|||||||
+2
-8
@@ -2,7 +2,6 @@ version: "3.9"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: tap:latest # or build: . if you’re building locally
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -10,12 +9,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "81:8080" # host:container
|
- "81:80" # host:container
|
||||||
|
|
||||||
environment:
|
|
||||||
# --- Laravel Core ---
|
|
||||||
APP_NAME: "Laravel"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# - SQLite database file
|
- .env:/var/www/html/.env
|
||||||
- ./database:/var/www/html/database
|
|
||||||
Reference in new issue
Block a user