Replies: 2 comments
-
It seems like you're trying to run Nginx Unit on a Docker image variant of RoadRunner, which will never work. Please review the documentation on how to use my Docker images and try again with the following Dockerfile: FROM shinsenter/php:8.2-unit-php
RUN phpaddmod ftp amqp posix excimer sockets soap
ENV INITIAL_PROJECT=laravel/laravel
ENV DOCUMENT_ROOT=/public
# Copy source of your project to the container if needed
# COPY . /var/www/html The Docker image If you want to customize the configuration yourself, I recommend using the official PHP Docker images and customizing from those images. Best regards. |
Beta Was this translation helpful? Give feedback.
-
By the way, I have Docker images for the Laravel projects. Please take a look. |
Beta Was this translation helpful? Give feedback.
-
Im trying to use roadrunner and unit on laravel project but doesnt works :C,
this is my dockerfile:
`FROM shinsenter/php:8.2-roadrunner
RUN phpaddmod ftp amqp posix excimer sockets soap
Install php extensions
RUN chmod +x /usr/local/bin/install-php-extensions &&
install-php-extensions
@composer
Enable phpredis extension
#RUN echo "extension=redis.so" > /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
Set up working directory
WORKDIR /var/www/html
Copy Laravel application files into the container
COPY . /var/www/html
Copy NGINX Unit configuration file
COPY ./infra/php/unitconfig.json /docker-entrypoint.d/
RUN chown -R www-data:www-data /var/www
&& chmod 755 -R /var/www
Healthcheck
HEALTHCHECK --interval=15m --timeout=3s
CMD curl --fail http://localhost/ || exit 1
Expose ports 80 and 443
EXPOSE 80
EXPOSE 443
EXPOSE 8080
Start NGINX Unit
CMD ["unitd", "--no-daemon", "--control", "0.0.0.0:8080"]
`
and this docker compose:
php: #uncomment this if you will use only docker compose build: context: "." dockerfile: Dockerfile # # target: php-production # Specify the target build stage if applicable # # args: # # - BUILD_ENV=production # Pass any necessary build arguments # #container_name: php-tabantaj #uncomment this if you will use only docker compose #image: johnvo95/tabantaj_php-tabantaj:latest container_name: php-tabantaj restart: unless-stopped tty: true volumes: - .:/var/www/html ports: - 8080:8080 networks: - tabantajnetwork
Beta Was this translation helpful? Give feedback.
All reactions