Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Howto]: update the php-fpm from 8.0 to 8.0.2 #917

Closed
7 of 8 tasks
nselden opened this issue Sep 9, 2022 · 10 comments · Fixed by #935
Closed
7 of 8 tasks

[Howto]: update the php-fpm from 8.0 to 8.0.2 #917

nselden opened this issue Sep 9, 2022 · 10 comments · Fixed by #935

Comments

@nselden
Copy link

nselden commented Sep 9, 2022

Have you already checked elsewhere?

What are you struggling with?

I need to be able to code in the dev environment in 8.0.2 I can't go to 8.1 or down to 7.

image

What have you tried already?

I've exhausted all online resources and the forum. Admittedly my knowledge of docker is very rudimentary. But I know how to solve 99% of the problems that have come my way so far.

What is your goal?

I am building an internet application

@vikas5914
Copy link
Contributor

Do following:

  1. docker-compose stop
  2. Edit .env and change the PHP version that you required.
  3. docker-compose up

@nselden
Copy link
Author

nselden commented Sep 10, 2022

Do following:

1. `docker-compose stop`

2. Edit .env and change the PHP version that you required.

3. `docker-compose up`

Hey thank you so much for your reply. I only have 8.0 and 8.1 and then everything below 8.0. The 8.0 php -v is not returning 8.0.2 any ideas on where to go from here?

@vikas5914
Copy link
Contributor

Which package are you using that requires this? can you use 8.1 if possible?

@nselden
Copy link
Author

nselden commented Sep 10, 2022

Which package are you using that requires this? can you use 8.1 if possible?

It's symfony that is throwing the error, and I can't use 8.1 because the imagick extension isn't ready yet and the GD extension is incompatible plus a host of other compatibility issues that come with using the newest version of anything.

@vikas5914
Copy link
Contributor

@nselden I checked and I switch to PHP 8.0 and I got PHP 8.0.19 version.

image

@nselden
Copy link
Author

nselden commented Sep 10, 2022

Well that's promising...
do you know how to get from me to you? maybe I can jump up one from there
image

@nselden
Copy link
Author

nselden commented Sep 10, 2022

I've already tried updating the whole devilbox and the individual container

@vikas5914
Copy link
Contributor

show me your docker-compose.yml

@nselden
Copy link
Author

nselden commented Sep 11, 2022

`---

-------------------------

| D E V I L S T A C K |

-------------------------

Local LAMP/LEMP stack

${VARIABLE:-default} will evaluate to default if VARIABLE is unset or empty.

${VARIABLE-default} will evaluate to default only if VARIABLE is unset.

-- DO NOT EDIT THIS FILE --

Copy 'docker-compose.override.yml-example' to 'docker-compose.override.yml'

and edit this file with your custom changes (override or even new services).

Edit '.env' for configuration.

If '.env' does not exist, copy 'env-example' to '.env'

$ cp env-example .env

version: '2.3'

################################################################################

SERVICES

################################################################################
services:

------------------------------------------------------------

Bind (DNS Server)

------------------------------------------------------------

bind:
image: cytopia/bind:0.15
hostname: bind
restart: always
ports:
# [local-machine:]local-port:docker-port
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/tcp"
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/udp"

environment:
  ##
  ## Debug?
  ##
  - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}

  ##
  ## Bind wildcard/host settings
  ##
  - WILDCARD_DNS=${TLD_SUFFIX:-loc}=127.0.0.1
  - EXTRA_HOSTS=${EXTRA_HOSTS}

  ##
  ## Forwarding
  ##
  - DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}

  ##
  ## Security
  ##
  - DNSSEC_VALIDATE=${BIND_DNSSEC_VALIDATE:-no}

  ##
  ## Time settings
  ##
  - TTL_TIME=${BIND_TTL_TIME}
  - REFRESH_TIME=${BIND_REFRESH_TIME}
  - RETRY_TIME=${BIND_RETRY_TIME}
  - EXPIRY_TIME=${BIND_EXPIRY_TIME}
  - MAX_CACHE_TIME=${BIND_MAX_CACHE_TIME}

  ##
  ## Query log
  ##
  - DOCKER_LOGS=${BIND_LOG_DNS_QUERIES}

dns:
  - 127.0.0.1

# MacOS and Windows have this by default, this hack also allows it for Linux
extra_hosts:
  docker.for.lin.host.internal: 172.16.238.1
  docker.for.lin.localhost: 172.16.238.1

networks:
  app_net:
    ipv4_address: 172.16.238.100

------------------------------------------------------------

PHP

------------------------------------------------------------

php:
image: devilbox/php-fpm:${PHP_SERVER}-work-0.122
hostname: php

##
## All .env variables
##
## Source all variables defined in .env
## This also makes any custom variable available in each PHP/HHVM container
##
env_file:
  - ./.env

environment:
  ##
  ## Debug/Logging
  ##
  - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
  - DEBUG_COMPOSE_ENTRYPOINT
  - DOCKER_LOGS

  ##
  ## Tools
  ##
  - COMPOSER_MEMORY_LIMIT=-1

  ##
  ## UserID and GroupID
  ##
  - NEW_UID
  - NEW_GID

  ##
  ## Adjust timezone
  ##
  - TIMEZONE

  ##
  ## Enable/Disable PHP Modules
  ##
  - ENABLE_MODULES=${PHP_MODULES_ENABLE}
  - DISABLE_MODULES=${PHP_MODULES_DISABLE}

  ##
  ## Mail-catching
  ##
  - ENABLE_MAIL=${PHP_MAIL_CATCH_ALL:-2}

  ##
  ## Enable 127.0.0.1 Port-forwarding
  ##
  - FORWARD_PORTS_TO_LOCALHOST=80:httpd:80,443:httpd:443,3306:mysql:3306,5432:pgsql:5432,6379:redis:6379,11211:memcd:11211,27017:mongo:27017

  ##
  ## MySQL Backups
  ##
  - MYSQL_BACKUP_USER=root
  - MYSQL_BACKUP_PASS=${MYSQL_ROOT_PASSWORD}
  - MYSQL_BACKUP_HOST=mysql

dns:
  - 172.16.238.100

# MacOS and Windows have this by default, this hack also allows it for Linux
extra_hosts:
  docker.for.lin.host.internal: 172.16.238.1
  docker.for.lin.localhost: 172.16.238.1

networks:
  app_net:
    ipv4_address: 172.16.238.10

volumes:
  # ---- Format: ----
  # HOST-DIRECTORY : DOCKER-DIRECTORY

  # Mount custom intranet
  - ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro${MOUNT_OPTIONS}

  # Mount custom mass virtual hosting
  - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}

  # Mount logs
  - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:rw${MOUNT_OPTIONS}

  # Mount Mail directory
  - devilbox-mail:/var/mail:rw${MOUNT_OPTIONS}

  # Mount DB Backup directory
  - ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

  # Mount devilbox user-defined *.ini files in order
  # to overwrite the default PHP.ini configuration
  - ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER}:/etc/php-custom.d:ro${MOUNT_OPTIONS}

  # Mount devilbox user-defined PHP-FPM *.conf files in order
  # to overwrite the default PHP-FPM configuration
  - ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}

  # Mount devilbox user-defined *.so files in order
  # to load custom PHP modules
  - ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS}

  # Mount devilbox user-defined PHP-FPM startup *.sh scripts
  - ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.1.d:rw${MOUNT_OPTIONS}
  - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}

  # Mount devilbox user-defined bash config
  - ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}

  # Mount devilbox user-defined supervisord config
  - ${DEVILBOX_PATH}/supervisor:/etc/supervisor/custom.d:rw${MOUNT_OPTIONS}

  # Certificate Authority public key
  - ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}

  # Users SSH directory (read-only)
  - ${HOST_PATH_SSH_DIR}:/home/devilbox/.ssh:ro${MOUNT_OPTIONS}

depends_on:
  - bind

------------------------------------------------------------

Web Server

------------------------------------------------------------

httpd:
image: devilbox/${HTTPD_SERVER}:0.36
hostname: httpd

environment:

  ##
  ## Debug/Logging
  ##
  - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
  - DEBUG_RUNTIME=${DEBUG_COMPOSE_ENTRYPOINT}
  - DOCKER_LOGS

  ##
  ## Adjust timezone
  ##
  - TIMEZONE

  ##
  ## UserID and GroupID
  ##
  - NEW_UID
  - NEW_GID

  ##
  ## Nginx specific worker/connection settings
  ##
  - WORKER_PROCESSES=${HTTPD_NGINX_WORKER_PROCESSES:-auto}
  - WORKER_CONNECTIONS=${HTTPD_NGINX_WORKER_CONNECTIONS:-1024}

  ##
  ## Disable default vhost?
  ##
  - MAIN_VHOST_ENABLE=${DEVILBOX_UI_ENABLE}
  - MAIN_VHOST_STATUS_ENABLE=1
  - MAIN_VHOST_STATUS_ALIAS=/devilbox-httpd-status
  - MAIN_VHOST_SSL_TYPE=${HTTPD_VHOST_SSL_TYPE:-both}
  - MAIN_VHOST_SSL_GEN=1
  - MAIN_VHOST_SSL_CN=${DEVILBOX_UI_SSL_CN:-localhost}

  ##
  ## Enable Mass Vhosts
  ##
  - MASS_VHOST_ENABLE=1
  - MASS_VHOST_TLD=.${TLD_SUFFIX}
  - MASS_VHOST_DOCROOT=${HTTPD_DOCROOT_DIR}
  - MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR}
  - MASS_VHOST_SSL_TYPE=${HTTPD_VHOST_SSL_TYPE:-both}
  - MASS_VHOST_SSL_GEN=1

  ##
  ## PHP-FPM Remote Server
  ##
  - COMPAT=${PHP_SERVER}
  - PHP_FPM_ENABLE=1
  - PHP_FPM_SERVER_ADDR=172.16.238.10
  - PHP_FPM_SERVER_PORT=9000
  - PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180}

ports:
  # ---- Format: ----
  # [HOST-ADDR : ] HOST-PORT : DOCKER-PORT
  - "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD}:80"
  - "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD_SSL}:443"

networks:
  app_net:
    ipv4_address: 172.16.238.11

volumes:
  # ---- Format: ----
  # HOST-DIRECTORY : DOCKER-DIRECTORY

  # Mount custom intranet
  - ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro${MOUNT_OPTIONS}

  # Mount custom mass virtual hosting
  - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}

  # Mount custom web server config directory
  - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS}

  # Mount custom vhost-templates
  - ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d:rw${MOUNT_OPTIONS}

  # Mount logs
  - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS}

  # Certificate Authority public key
  - ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}

depends_on:
  - bind
  - php

------------------------------------------------------------

MySQL Database

------------------------------------------------------------

mysql:
image: devilbox/mysql:${MYSQL_SERVER}-0.7
hostname: mysql

environment:
  - MYSQL_ROOT_PASSWORD
  - MYSQL_ALLOW_EMPTY_PASSWORD=yes

ports:
  # [local-machine:]local-port:docker-port
  - "${LOCAL_LISTEN_ADDR}${HOST_PORT_MYSQL}:3306"

networks:
  app_net:
    ipv4_address: 172.16.238.12

volumes:
  # ---- Format: ----
  # HOST-DIRECTORY : DOCKER-DIRECTORY

  # Mount devilbox user-defined cnf files in order
  # to overwrite the MySQL server configuration
  - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS}

  # Mount MySQL Data directory
  - devilbox-${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS}

depends_on:
  - bind
  - php
  - httpd

------------------------------------------------------------

PostgreSQL

------------------------------------------------------------

pgsql:
image: postgres:${PGSQL_SERVER}
hostname: pgsql

environment:

  - POSTGRES_USER=${PGSQL_ROOT_USER}
  - POSTGRES_PASSWORD=${PGSQL_ROOT_PASSWORD}
  - POSTGRES_HOST_AUTH_METHOD=${PGSQL_HOST_AUTH_METHOD:-trust}
  - PGDATA=/var/lib/postgresql/data/pgdata

ports:
  # [local-machine:]local-port:docker-port
  - "${LOCAL_LISTEN_ADDR}${HOST_PORT_PGSQL}:5432"

networks:
  app_net:
    ipv4_address: 172.16.238.13

volumes:
  # ---- Format: ----
  # HOST-DIRECTORY : DOCKER-DIRECTORY

  # Mount PostgreSQL Data directory
  - devilbox-pgsql-${PGSQL_SERVER}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS}

depends_on:
  - bind
  - php
  - httpd

------------------------------------------------------------

Redis

------------------------------------------------------------

redis:
image: redis:${REDIS_SERVER}
hostname: redis

# Apply custom arguments to redis startup
command: redis-server ${REDIS_ARGS:- }
environment:
  - REDIS_ARGS=${REDIS_ARGS:- }

ports:
  # [local-machine:]local-port:docker-port
  - "${LOCAL_LISTEN_ADDR}${HOST_PORT_REDIS}:6379"

networks:
  app_net:
    ipv4_address: 172.16.238.14

depends_on:
  - bind
  - php
  - httpd

------------------------------------------------------------

Memcached

------------------------------------------------------------

memcd:
image: memcached:${MEMCD_SERVER}
hostname: memcd

ports:
  # [local-machine:]local-port:docker-port
  - "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEMCD}:11211"

networks:
  app_net:
    ipv4_address: 172.16.238.15

depends_on:
  - bind
  - php
  - httpd

------------------------------------------------------------

################################################################################

NETWORK

################################################################################
networks:
app_net:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1

################################################################################

VOLUMES

################################################################################
volumes:

------------------------------------------------------------

Misc

------------------------------------------------------------

devilbox-mail:

------------------------------------------------------------

MySQL

------------------------------------------------------------

devilbox-mysql-5.5:
devilbox-mysql-5.6:
devilbox-mysql-5.7:
devilbox-mysql-8.0:
devilbox-mariadb-5.5:
devilbox-mariadb-10.0:
devilbox-mariadb-10.1:
devilbox-mariadb-10.2:
devilbox-mariadb-10.3:
devilbox-mariadb-10.4:
devilbox-mariadb-10.5:
devilbox-percona-5.5:
devilbox-percona-5.6:
devilbox-percona-5.7:
devilbox-percona-8.0:

------------------------------------------------------------

Postgres

------------------------------------------------------------

devilbox-pgsql-9.0:
devilbox-pgsql-9.1:
devilbox-pgsql-9.2:
devilbox-pgsql-9.2-alpine:
devilbox-pgsql-9.3:
devilbox-pgsql-9.3-alpine:
devilbox-pgsql-9.4:
devilbox-pgsql-9.4-alpine:
devilbox-pgsql-9.5:
devilbox-pgsql-9.5-alpine:
devilbox-pgsql-9.6:
devilbox-pgsql-9.6-alpine:
devilbox-pgsql-10.0:
devilbox-pgsql-10.0-alpine:
devilbox-pgsql-10.1:
devilbox-pgsql-10.1-alpine:
devilbox-pgsql-10.2:
devilbox-pgsql-10.2-alpine:
devilbox-pgsql-10.3:
devilbox-pgsql-10.3-alpine:
devilbox-pgsql-10.4:
devilbox-pgsql-10.4-alpine:
devilbox-pgsql-10.5:
devilbox-pgsql-10.5-alpine:
devilbox-pgsql-10.6:
devilbox-pgsql-10.6-alpine:
devilbox-pgsql-11.0:
devilbox-pgsql-11.0-alpine:
devilbox-pgsql-11.1:
devilbox-pgsql-11.1-alpine:
devilbox-pgsql-11.2:
devilbox-pgsql-11.2-alpine:
devilbox-pgsql-11.3:
devilbox-pgsql-11.3-alpine:
devilbox-pgsql-11.4:
devilbox-pgsql-11.4-alpine:
devilbox-pgsql-11.5:
devilbox-pgsql-11.5-alpine:
devilbox-pgsql-11.6:
devilbox-pgsql-11.6-alpine:
devilbox-pgsql-11.7:
devilbox-pgsql-11.7-alpine:
devilbox-pgsql-11.8:
devilbox-pgsql-11.8-alpine:
devilbox-pgsql-11.9:
devilbox-pgsql-11.9-alpine:
devilbox-pgsql-12.0:
devilbox-pgsql-12.0-alpine:
devilbox-pgsql-12.1:
devilbox-pgsql-12.1-alpine:
devilbox-pgsql-12.2:
devilbox-pgsql-12.2-alpine:
devilbox-pgsql-12.3:
devilbox-pgsql-12.3-alpine:
devilbox-pgsql-12.4:
devilbox-pgsql-12.4-alpine:
devilbox-pgsql-13.0:
devilbox-pgsql-13.0-alpine:
devilbox-pgsql-latest:
devilbox-pgsql-alpine:
`

@vikas5914
Copy link
Contributor

Looks like your docker-compose.yml is outdated. I suggest you check if you are on the latest version of the devil box or not.

Once you update the devil box, you can use docker-compose pull get the latest image.

@cytopia cytopia self-assigned this Dec 1, 2022
@cytopia cytopia mentioned this issue Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants