1

I am trying to run Open cart on AWS Fargate, i am using native bitnami release, following is my docker-compose.yml

version: '2'
services:
  mariadb:
    image: 'docker.io/bitnami/mariadb:10.3-debian-10'
    environment:
      - MARIADB_USER=bn_opencart
      - MARIADB_DATABASE=bitnami_opencart
      - ALLOW_EMPTY_PASSWORD=yes
    volumes:
      - 'mariadb_data:/bitnami'
  opencart:
    image: 'docker.io/bitnami/opencart:3-debian-10'
    environment:
      - MARIADB_HOST=mariadb
      - MARIADB_PORT_NUMBER=3306
      - OPENCART_DATABASE_USER=bn_opencart
      - OPENCART_DATABASE_NAME=bitnami_opencart
      - OPENCART_DATABASE_PASSWORD=some_password
      - OPENCART_HOST=localhost
      - ALLOW_EMPTY_PASSWORD=yes
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - 'opencart_data:/bitnami'
    depends_on:
      - mariadb
volumes:
  mariadb_data:
    driver: local
  opencart_data:
    driver: local

Above works fine on local environment, but when i deploy AWS Fargate , i get the following error.

The OPENCART_DATABASE_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development.

noobie-php
  • 133
  • 5
  • The initialization is checking this: [[ -z "$OPENCART_DATABASE_PASSWORD" ]]. I guess that this could be an issue with the characters include in the password, or with the length of the env variables allowed in fargate. For the 1st case, just to check, use paswords like `MyP3ssw2ord` (w/o symbols). The second case is more complex to check, you will need to change the entrypoint of the container to `tail -f /dev/null`, and then and then get into the opencart container and check the enviroment variables with: `env | sort`. You should see the `OPENCART_DATABASE_PASSWORD` env with the value you set. – Jota Martos Aug 25 '20 at 09:15

0 Answers0