containers icon indicating copy to clipboard operation
containers copied to clipboard

wordpress docker volume mount doesn't work

Open tareksalem opened this issue 1 year ago • 1 comments

Name and Version

bitnami/wordpress-nginx

What architecture are you using?

amd64

What steps will reproduce the bug?

I have the following docker compose

version: "3.9"
name: "3bcfe240-8000-4e2c-ac11-5f73e62150b4"
services:
  wordpress:
    container_name: 3bcfe240-8000-4e2c-ac11-5f73e62150b4
    image: bitnami/wordpress-nginx
    deploy:
      restart_policy:
        condition: always
    logging:
      driver: "json-file"
      options:
        max-size: "1g"
        max-file: "2"
    networks:
      - web
      - MariadbV11-net
      - 3bcfe240-8000-4e2c-ac11-5f73e62150b4
    labels:
      - "appId=3bcfe240-8000-4e2c-ac11-5f73e62150b4"
      - traefik.enable=true
      - traefik.http.routers.3bcfe240-8000-4e2c-ac11-5f73e62150b4-0.entrypoints=websecured
      - traefik.http.routers.3bcfe240-8000-4e2c-ac11-5f73e62150b4-0.rule=Host(`wordpress.zac1ywyazac1ywyasaaztk.servers.zacloud.net`)
      - traefik.http.routers.3bcfe240-8000-4e2c-ac11-5f73e62150b4-0.service=3bcfe240-8000-4e2c-ac11-5f73e62150b4-0-service
      - traefik.http.routers.3bcfe240-8000-4e2c-ac11-5f73e62150b4-0.tls.certResolver=maintlsresolver
      - traefik.http.services.3bcfe240-8000-4e2c-ac11-5f73e62150b4-0-service.loadbalancer.server.port=8080
    env_file:
      - ./.env
    ports:
      - :8080
    environment:
      - WORDPRESS_ENABLE_REVERSE_PROXY=yes
      - WORDPRESS_SKIP_BOOTSTRAP=yes
      - WORDPRESS_DATA_TO_PERSIST=/
      - DATABASE=mariadb
      - WORDPRESS_DATABASE_NAME=wordpress
      - WORDPRESS_DATABASE_HOST=MariadbV11
      - WORDPRESS_DATABASE_PORT=0
      - WORDPRESS_DATABASE_USER=wordpress
      - WORDPRESS_DATABASE_PASSWORD=wordpress
    WORDPRESS_DATABASE_CONNECTION=mysql://wordpress:wordpress@MariadbV11/wordpress
    volumes:
      - wordpress-files:/bitnami/wordpress
networks:
  web:
    external: true
  MariadbV11-net:
    external: true
  3bcfe240-8000-4e2c-ac11-5f73e62150b4:
    driver: bridge
    name: 3bcfe240-8000-4e2c-ac11-5f73e62150b4
volumes:
  wordpress-files:
    name: 3bcfe240-8000-4e2c-ac11-5f73e62150b4-wordpress-files
    driver_opts:
      type: "none"
      o: "bind"
      device: "/var/apps/3bcfe240-8000-4e2c-ac11-5f73e62150b4/code"

What is the expected behavior?

Based on the documentation it should mount the volume and if the WordPress is a fresh installation it should download the needed files but this doesn't happen

What do you see instead?

the docker container enters in a restarting loop and doesn't work also the wordpress files are not mounted to the specified volume

I am getting this logs

3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.60 INFO  ==> 
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.60 INFO  ==> Welcome to the Bitnami wordpress-nginx container
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.61 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.61 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.62 INFO  ==> 
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.62 INFO  ==> ** Starting WordPress setup **
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:54.65 INFO  ==> Validating settings in NGINX_* env vars
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | Generating RSA private key, 4096 bit long modulus (2 primes)
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | .........++++
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | .................................................................................................................................................................................................................++++
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | e is 65537 (0x010001)
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | Signature ok
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | subject=CN = example.com
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | Getting Private key
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.60 INFO  ==> No custom scripts in /docker-entrypoint-initdb.d
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.61 INFO  ==> Initializing NGINX
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | realpath: /bitnami/nginx/conf/vhosts: No such file or directory
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.63 INFO  ==> Configuring PHP options
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.63 INFO  ==> Setting PHP expose_php option
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.64 INFO  ==> Setting PHP output_buffering option
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.65 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:55.75 INFO  ==> Restoring persisted WordPress installation
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | wordpress 10:44:56.25 INFO  ==> Trying to connect to the database server
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | Error: 'wp-config.php' not found.
3bcfe240-8000-4e2c-ac11-5f73e62150b4  | Either create one manually or use `wp config create`.
3bcfe240-8000-4e2c-ac11-5f73e62150b4 exited with code 0

Additional information

No response

tareksalem avatar Feb 13 '24 10:02 tareksalem

Did you follow the steps in this guide?

https://docs.bitnami.com/tutorials/deploy-locally-custom-wordpress/

mdhont avatar Mar 01 '24 16:03 mdhont

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Mar 17 '24 01:03 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Mar 23 '24 01:03 github-actions[bot]