0

I'm trying to run an application behind jwilder/nginx-proxy. I have other websites up and working with nginx-proxy, but i'm having issues with this one:

  • If i ran it with the application up i got a 502 error
  • If i stop the application I got (logically) a 503 error.

This is my YAML. What i'm doing wrong?

NOTE: if i uncomment the ports section it works locally.

services:
  app:
    image: monica
    depends_on:
      - db
#    ports:
#      - 8081:80
    expose:
      - 80
    environment:
      - VIRTUAL_HOST=pepe.domain.com
      - VIRTUAL_PORT=80
      - APP_KEY=xxxxxxx
      - DB_HOST=db
      - DB_USERNAME=monica
      - DB_PASSWORD=xxxxx
    volumes:
      - data-monica:/var/www/html/storage
    restart: always

  db:
    image: mysql
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=true
      - MYSQL_DATABASE=xxxx
      - MYSQL_USER=xxxxx
      - MYSQL_PASSWORD=xxxx
    volumes:
      - mysql-monica:/var/lib/mysql
    restart: always

volumes:
  data-monica:
    name: data-monica
  mysql-monica:
    name: mysql-monica
emboole
  • 501
  • 6
  • 23

0 Answers0