refactor(docker): remove DOCKER_REGISTRY argument from Dockerfile and docker-compose.yml for simplification
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -1,24 +1,4 @@
|
|||||||
# syntax=docker/dockerfile:1.7
|
FROM docker.arvancloud.ir/php:8.4-fpm-bookworm AS app
|
||||||
|
|
||||||
ARG DOCKER_REGISTRY=docker.arvancloud.ir
|
|
||||||
ARG PHP_VERSION=8.4
|
|
||||||
|
|
||||||
# FROM ${DOCKER_REGISTRY}/node:24-alpine AS assets
|
|
||||||
# WORKDIR /app
|
|
||||||
#
|
|
||||||
# RUN sed -i 's|https://dl-cdn.alpinelinux.org|https://mirror.arvancloud.ir/alpine|g' /etc/apk/repositories
|
|
||||||
#
|
|
||||||
# COPY package.json package-lock.json ./
|
|
||||||
# RUN npm ci
|
|
||||||
#
|
|
||||||
# COPY resources ./resources
|
|
||||||
# COPY public ./public
|
|
||||||
# COPY vite.config.js ./
|
|
||||||
# RUN npm run build
|
|
||||||
|
|
||||||
ARG DOCKER_REGISTRY
|
|
||||||
ARG PHP_VERSION
|
|
||||||
FROM ${DOCKER_REGISTRY}/php:${PHP_VERSION}-fpm-bookworm AS app
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||||
@@ -90,8 +70,7 @@ EXPOSE 9000
|
|||||||
ENTRYPOINT ["docker-entrypoint"]
|
ENTRYPOINT ["docker-entrypoint"]
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
|
|
||||||
ARG DOCKER_REGISTRY
|
FROM docker.arvancloud.ir/nginx:1.27-alpine AS nginx
|
||||||
FROM ${DOCKER_REGISTRY}/nginx:1.27-alpine AS nginx
|
|
||||||
|
|
||||||
RUN sed -i 's|https://dl-cdn.alpinelinux.org|https://mirror.arvancloud.ir/alpine|g' /etc/apk/repositories
|
RUN sed -i 's|https://dl-cdn.alpinelinux.org|https://mirror.arvancloud.ir/alpine|g' /etc/apk/repositories
|
||||||
|
|
||||||
@@ -99,3 +78,6 @@ COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
|||||||
COPY --from=app /var/www/html/public /var/www/html/public
|
COPY --from=app /var/www/html/public /var/www/html/public
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
# npm build (run locally before docker build):
|
||||||
|
# npm ci && npm run build
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: app
|
target: app
|
||||||
args:
|
|
||||||
DOCKER_REGISTRY: docker.arvancloud.ir
|
|
||||||
image: hoshpoint-backend-app:production
|
image: hoshpoint-backend-app:production
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
@@ -27,8 +25,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: nginx
|
target: nginx
|
||||||
args:
|
|
||||||
DOCKER_REGISTRY: docker.arvancloud.ir
|
|
||||||
image: hoshpoint-backend-nginx:production
|
image: hoshpoint-backend-nginx:production
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user