so I have the following setup:
version: "3.8" services: # VUE-JS Instance client: build: client restart: always logging: driver: none ports: - 80:8080 volumes: - ./client:/app - /app/node_modules environment: - CHOKIDAR_USEPOLLING=true - NODE_ENV=development # SERVER php: build: php-fpm restart: always ports: - "9002:9000" volumes: - ./server:/var/www/:cached - ./logs/symfony:/var/www/var/logs:cached # WEBSERVER nginx: build: nginx restart: always ports: - 8080:80 volumes_from: - php volumes: - ./nginx/default.conf:/etc/nginx/conf.d/default.conf - ./logs/nginx/:/var/log/nginx:cached expose: - "8080"
My backend consists of a simple Symfony REST API, my frontend is a vue application. When I now try to call the API from my vue application with
127.0.0.1:8080, I get a Connection refused-error. When I try to call the API via my server’s public IP, I run into CORS issues.
Because I make those calls in an executed js file via axios, i’m not able to use the docker container names. Does anyone have an idea?