"502 bad gateway” when deploying

here’s the .travis.yml relevant info:

  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    container_name: wordpress
    ports:
      - "8000:80"
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpAdmin
    restart: always
    ports: 
        - 3333:80
    environment: 
        PMA_HOST: db
        MYSQL_ROOT_PASSWORD: somewordpress
volumes:
  db_data: {}

You need to setup logging in Beanstalk, and check the error in logs. Usually a 502 is a backend failure, so it could mean a DB failure or some PHP failure, and without logs it’s almost impossible to make a judgement.

2 Likes

this was the fix @montana, thank you.

to clarify, it was failing because before that (inserted some echos to make sure it’s working for example) come back, but nothing past the $s3->get_object.

Great to hear.