diff --git a/docker-compose.yml b/docker-compose.yml index 2ff5b78..b589126 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,59 @@ version: '3.8' -volumes: - data: services: - db: + mariadb: image: mariadb + container_name: mariadb environment: MYSQL_ROOT_PASSWORD: pelican MYSQL_DATABASE: pelican MYSQL_USER: pelican MYSQL_PASSWORD: pelican volumes: - - data:/var/lib/mysql + - ./mariadb:/var/lib/mysql pelican: - image: pelican - environment: [] + build: ./pelican + container_name: pelican + environment: + APP_ENV: production + APP_DEBUG: false + APP_KEY: + APP_TIMEZONE: Europe/Paris + APP_URL: https://pelican.tarkacore.dev + APP_LOCALE: en + APP_ENVIRONMENT_ONLY: true + + LOG_CHANNEL: daily + LOG_STACK: single + LOG_DEPRECATIONS_CHANNEL: null + LOG_LEVEL: debug + + DB_CONNECTION: mysql + DB_HOST: mariadb + DB_DATABASE: pelican + DB_USERNAME: pelican + DB_PASSWORD: pelican + + CACHE_STORE: file + QUEUE_CONNECTION: sync + SESSION_DRIVER: file + + HASHIDS_SALT: pipi1234 + HASHIDS_LENGTH: 8 + + MAIL_MAILER: log + MAIL_HOST: smtp.example.com + MAIL_PORT: 25 + MAIL_USERNAME: none + MAIL_PASSWORD: none + MAIL_ENCRYPTION: tls + MAIL_FROM_ADDRESS: support@tarkacore.dev + MAIL_FROM_NAME: TarkaPelican + # Set this to your domain to prevent it defaulting to 'localhost', causing mail servers such as Gmail to reject your mail + # MAIL_EHLO_DOMAIN=panel.example.com + SESSION_ENCRYPT: false + SESSION_PATH: / + SESSION_DOMAIN: null volumes: - - ./pelican:/app \ No newline at end of file + - ./pelican:/app + ports: + - 80:80 \ No newline at end of file diff --git a/pelican-Dockerfile.patch b/pelican-Dockerfile.patch new file mode 100644 index 0000000..5661f45 --- /dev/null +++ b/pelican-Dockerfile.patch @@ -0,0 +1,32 @@ +diff --git a/Dockerfile b/Dockerfile +index 95d0fefe..5ab7e654 100644 +--- a/Dockerfile ++++ b/Dockerfile +@@ -2,7 +2,8 @@ + # Build the assets that are needed for the frontend. This build stage is then discarded + # since we won't need NodeJS anymore in the future. This Docker image ships a final production + # level distribution +-FROM --platform=$TARGETOS/$TARGETARCH mhart/alpine-node:14 ++FROM --platform=$TARGETOS/$TARGETARCH node:lts-alpine3.19 ++ + WORKDIR /app + COPY . ./ + RUN yarn install --frozen-lockfile \ +@@ -10,13 +11,15 @@ RUN yarn install --frozen-lockfile \ + + # Stage 1: + # Build the actual container with all of the needed PHP dependencies that will run the application. +-FROM --platform=$TARGETOS/$TARGETARCH php:8.1-fpm-alpine ++FROM --platform=$TARGETOS/$TARGETARCH php:8.2-fpm-alpine + WORKDIR /app + COPY . ./ + COPY --from=0 /app/public/assets ./public/assets +-RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot certbot-nginx \ ++RUN apk add --no-cache --update icu-dev ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot certbot-nginx \ + && docker-php-ext-configure zip \ + && docker-php-ext-install bcmath gd pdo_mysql zip \ ++ && docker-php-ext-configure intl \ ++ && docker-php-ext-install intl \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ + && cp .env.example .env \ + && mkdir -p bootstrap/cache/ storage/logs storage/framework/sessions storage/framework/views storage/framework/cache \