Replies: 1 comment
-
This request does not follow our help guidelines: https://serversideup.net/how-to-ask-for-help/ If you'd like someone to help:
Simply pasting an error message with a massive Dockerfile will not motivate community members to help you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
have the following error:
on this code:
dockerfile:
================
#Base Stage
#================
FROM serversideup/php:8.2-fpm-nginx as base
ENV AUTORUN_ENABLED=false
ENV SSL_MODE=mixed
ENV PHP_MAX_EXECUTION_TIME=3600
ENV PHP_MEMORY_LIMIT=3060M
ENV PHP_POST_MAX_SIZE=3060M
ENV PHP_PM_MAX_SPARE_SERVERS=10
ENV PHP_PM_START_SERVERS=5
ENV PHP_PM_MIN_SPARE_SERVERS=5
ENV PHP_PM_MAX_CHILDREN=15
================
Production Stage
================
FROM base as production
RUN apt-get update &&
apt-get install -y
php8.2-imagick
php8.2-bcmath
php8.2-gd
php8.2-cli
php8.2-pgsql
php8.2-mbstring
php8.2-xml
php8.2-zip
php8.2-curl
php8.2-calendar
php8.2-exif
php8.2-ftp
php8.2-intl
php8.2-mysql
php8.2-soap
php8.2-sockets
php8.2-apcu
php8.2-opcache
php8.2-excimer
php8.2-redis
#rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
Install phpredis extension
RUN pecl install redis &&
docker-php-ext-enable redis
USER $PUID:$PGID
#Copy contents.
#- To ignore files or folders, use .dockerignore
COPY --chown=$PUID:$PGID . .
RUN composer install --optimize-autoloader --no-dev --no-interaction --no-progress --ansi
#artisan commands
#RUN php ./artisan optimize:clear
php ./artisan route:cache && \
php ./artisan view:cache
USER root:root
and this
docker-compose.yml:
version: "3.8"
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
restart: unless-stopped
tty: true
ports:
- 80:80
- 443:443
volumes:
- .:/var/www/html
- ./infra/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- mysql-katbol
networks:
- katbolnetwork
deploy: # Swarm configuration for php service
replicas: 1
mysql-katbol:
image: mysql:8.0
container_name: mysql-katbol
restart: unless-stopped
tty: true
ports:
- 33069:3306
volumes:
- katbol-db:/var/lib/mysql
environment:
MYSQL_DATABASE: "homestead"
MYSQL_USER: "homestead"
MYSQL_PASSWORD: "secret"
MYSQL_ROOT_PASSWORD: "secret"
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- katbolnetwork
php:
build:
context: .
dockerfile: Dockerfile
container_name: php
restart: unless-stopped
tty: true
volumes:
- .:/var/www/html
ports:
- 9000:80
networks:
- katbolnetwork
deploy: # Swarm configuration for php service
replicas: 1
redis-katbol:
image: redis:alpine
container_name: redis-katbol
restart: unless-stopped
tty: true
volumes:
- ./infra/redis/redis.conf:/usr/local/etc/redis/redis.conf # Mount the Redis configuration file
networks:
- katbolnetwork
mem_limit: 2g
rdadmin-katbol:
image: erikdubbelboer/phpredisadmin:latest
container_name: rdadmin-katbol
restart: unless-stopped
tty: true
ports:
- 6360:80
environment:
- REDIS_1_HOST=redis-katbol # Replace with your Redis container name
- REDIS_1_PORT=6379 # Replace with your Redis container port
#- REDIS_1_AUTH=silent11!
networks:
- katbolnetwork
volumes:
katbol-db:
driver: local
networks:
katbolnetwork:
Beta Was this translation helpful? Give feedback.
All reactions