DONE: separate repo for be and fe, update cicd
Build Docker Image / build-backend (push) Successful in 1m18s
Build Docker Image / build-backend (push) Successful in 1m18s
This commit is contained in:
@@ -37,7 +37,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
WORKDIR /var/www
|
||||
|
||||
# Copy the entire Laravel application code into the container
|
||||
COPY be/ /var/www
|
||||
COPY . /var/www
|
||||
|
||||
# Copy Composer from official image (avoids flaky getcomposer.org in CI)
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
|
||||
@@ -56,7 +56,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
unzip \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY be/package.json be/package-lock.json ./
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
ENV PUPPETEER_SKIP_DOWNLOAD=true \
|
||||
PUPPETEER_CACHE_DIR=/var/www/.cache/puppeteer
|
||||
@@ -135,11 +135,11 @@ RUN curl -o /usr/local/bin/php-fpm-healthcheck \
|
||||
&& chmod +x /usr/local/bin/php-fpm-healthcheck
|
||||
|
||||
# Copy the initialization script
|
||||
COPY be/docker/common/unified/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY docker/common/unified/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Copy supervisor configuration files
|
||||
COPY be/docker/common/unified/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
COPY docker/common/unified/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
|
||||
# Create supervisor conf.d directory
|
||||
RUN mkdir -p /etc/supervisor/conf.d
|
||||
@@ -149,11 +149,11 @@ RUN mkdir -p /etc/supervisor/conf.d
|
||||
# by mounting files into:
|
||||
# - /etc/nginx/nginx.conf
|
||||
# - /etc/supervisor/conf.d/
|
||||
COPY be/docker/common/unified/supervisor/unified.conf /etc/supervisor/conf.d/unified.conf
|
||||
COPY be/docker/common/unified/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY docker/common/unified/supervisor/unified.conf /etc/supervisor/conf.d/unified.conf
|
||||
COPY docker/common/unified/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Copy the initial storage structure
|
||||
COPY be/storage /var/www/storage-init
|
||||
COPY storage /var/www/storage-init
|
||||
|
||||
# Copy PHP extensions and libraries from the builder stage
|
||||
COPY --from=builder /usr/local/lib/php/extensions/ /usr/local/lib/php/extensions/
|
||||
@@ -164,7 +164,7 @@ COPY --from=builder /usr/local/bin/docker-php-ext-* /usr/local/bin/
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
# Custom PHP overrides (upload limits, etc.) — official image loads conf.d/*.ini
|
||||
COPY be/docker/common/unified/php/uploads.ini /usr/local/etc/php/conf.d/uploads.ini
|
||||
COPY docker/common/unified/php/uploads.ini /usr/local/etc/php/conf.d/uploads.ini
|
||||
|
||||
# Enable PHP-FPM status page via separate config file (avoid modifying zz-docker.conf)
|
||||
RUN echo '[www]' > /usr/local/etc/php-fpm.d/zzz-status.conf && \
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- app-storage-production:/var/www/storage
|
||||
- app-logs-production:/var/www/storage/logs
|
||||
- ./.env:/var/www/.env:ro
|
||||
- ${NGINX_CONF:-./be/docker/production/nginx/nginx.conf}:/etc/nginx/nginx.conf:ro
|
||||
- ${NGINX_CONF:-./docker/production/nginx/nginx.conf}:/etc/nginx/nginx.conf:ro
|
||||
networks:
|
||||
- mykopkb-production-network
|
||||
depends_on:
|
||||
@@ -35,26 +35,6 @@ services:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
frontend:
|
||||
image: git.koppkb.com/kopkb/my-kopkb-fe:${IMAGE_TAG:-latest}
|
||||
container_name: mykopkb-fe-production
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${FE_PORT:-8081}:80"
|
||||
networks:
|
||||
- mykopkb-production-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
container_name: mykopkb-postgres-production
|
||||
@@ -67,7 +47,7 @@ services:
|
||||
- POSTGRES_DB=${DB_DATABASE}
|
||||
volumes:
|
||||
- db-data-production:/var/lib/postgresql/data
|
||||
- ./be/docker/postgres/conf.d:/etc/postgres/conf.d:ro
|
||||
- ./docker/postgres/conf.d:/etc/postgres/conf.d:ro
|
||||
networks:
|
||||
- mykopkb-production-network
|
||||
healthcheck:
|
||||
@@ -110,6 +90,7 @@ services:
|
||||
|
||||
networks:
|
||||
mykopkb-production-network:
|
||||
name: mykopkb-production-network
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
|
||||
@@ -2,7 +2,7 @@ services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./be/docker/common/unified/Dockerfile
|
||||
dockerfile: ./docker/common/unified/Dockerfile
|
||||
args:
|
||||
ENV: staging
|
||||
platforms:
|
||||
@@ -87,7 +87,7 @@ services:
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
volumes:
|
||||
- postgres-data-staging:/var/lib/postgres
|
||||
- ./be/docker/postgres/conf.d:/etc/postgres/conf.d:ro
|
||||
- ./docker/postgres/conf.d:/etc/postgres/conf.d:ro
|
||||
networks:
|
||||
- sutera-staging-network
|
||||
healthcheck:
|
||||
|
||||
Reference in New Issue
Block a user