0

I have 2 PHP applications one is laravel and the other is lumen, the lumen one is inside docker-compose service and the laravel one is in localhost I want to consume an API that is in the lumen app inside docker from the laravel one but every time I get 401 Unauthorized and the API is not authenticated here is the docker-compose file for the lumen service

version: "3.3"

services:
  public:
  container_name: laravel_app
  image: app:v1
  hostname: ${PUBLIC_DOMAIN}
  restart: unless-stopped
  build:
    context: ../docker
  volumes:
    - ../:/var/www/html
  environment:
    portal: public
    REDIS_HOST: redis_host
    APP_DOMAIN: ${PUBLIC_DOMAIN}
    PORTAL_URL: ${PUBLIC_DOMAIN}
    APP_URL: ${SCHEMA_HTTPS}://${PUBLIC_DOMAIN}
  networks:
    app_net:
      ipv4_address: "172.22.1.2"

networks:
  app_net:
    driver: bridge
     ipam:
      driver: default
      config:
        - subnet: "172.22.1.1/16"
Robert Stefanic
  • 401
  • 1
  • 4
  • 17
Ali Bedaer
  • 395
  • 1
  • 4
  • 12

0 Answers0