-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1a46b8
commit afb7ece
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM node:22-alpine3.20 | ||
|
||
RUN set -x \ | ||
&& addgroup -g 666 app \ | ||
&& adduser -u 666 -D -G app app | ||
|
||
EXPOSE 7132 | ||
EXPOSE 7133 | ||
|
||
RUN mkdir -p /opt/app | ||
WORKDIR /opt/app | ||
|
||
COPY ./ /opt/app/ | ||
|
||
USER root | ||
RUN chown app:app /opt/app/ -Rfv | ||
USER app | ||
|
||
RUN npm install | ||
|
||
ENTRYPOINT ["node", "/opt/app/app.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM wyrihaximusnet/php:8.4-nts-alpine-slim-dev AS install-dependencies | ||
|
||
WORKDIR /opt/app | ||
USER root | ||
RUN mkdir /opt/app/vendor && chown app:app /opt/app -Rfv | ||
USER app | ||
|
||
COPY ./composer.* /opt/app/ | ||
RUN composer install --ansi --no-interaction --prefer-dist --no-dev -o | ||
|
||
FROM wyrihaximusnet/php:8.4-nts-alpine-slim | ||
|
||
EXPOSE 7132 | ||
EXPOSE 7133 | ||
WORKDIR /opt/app | ||
|
||
COPY ./ /opt/app/ | ||
COPY --from=install-dependencies /opt/app/vendor/ /opt/app/vendor/ | ||
|
||
USER root | ||
RUN chown app:app /opt/app/ -Rf | ||
USER app | ||
|
||
ENTRYPOINT ["php", "/opt/app/app.php"] |