Initialize git-contribution-graph project with Docker setup, environment configuration, and core functionality for merging contributions from GitHub, GitLab, and Gitea into an SVG heatmap.
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
FROM php:8.3-cli-alpine AS base
|
||||
|
||||
# Runtime dependencies
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
icu-libs \
|
||||
libzip \
|
||||
&& docker-php-ext-install opcache
|
||||
|
||||
# Composer
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ── deps stage ────────────────────────────────────────────────────────────────
|
||||
FROM base AS deps
|
||||
COPY composer.json composer.lock* ./
|
||||
RUN composer install \
|
||||
--no-dev \
|
||||
--no-scripts \
|
||||
--no-interaction \
|
||||
--optimize-autoloader \
|
||||
--prefer-dist
|
||||
|
||||
# ── final stage ───────────────────────────────────────────────────────────────
|
||||
FROM base AS final
|
||||
|
||||
COPY --from=deps /app/vendor /app/vendor
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p var/cache var/log \
|
||||
&& chmod -R 777 var \
|
||||
&& composer dump-autoload --optimize --no-dev
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV APP_ENV=prod \
|
||||
APP_DEBUG=0
|
||||
|
||||
# Symfony's built-in dev server via PHP — fine for a single-purpose container
|
||||
CMD ["php", "-S", "0.0.0.0:8080", "-t", "public", "public/index.php"]
|
||||
Reference in New Issue
Block a user