Docker Laravel未加载资产

时间:2019-03-22 13:33:46

标签: laravel apache docker docker-compose

我已经配置了一个docker compose文件来使用apache和mysql运行laravel。该应用程序构建良好,但是当我访问它时,加载资源时出现此错误

Console errors 这是我的docker-compose文件conf:

    version: '3'
services:

  #PHP Service
  vma_web:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: vma_web
    restart: unless-stopped
    env_file: '.env.prod'
    tty: true
    ports:
      - "8250:80"
    environment:
      SERVICE_NAME: vma_web
      SERVICE_TAGS: 1.0.0
    networks:
      - app-network

  #MySQL Service
  vma_mysql:
    image: mysql:5.7
    container_name: vma_mysql
    restart: unless-stopped
    tty: true
    ports:
      - "33061:3306"
    environment:
      MYSQL_DATABASE: school_back
      MYSQL_ROOT_PASSWORD: epTfkgH9XakwN5mm
      SERVICE_TAGS: 1.0.0
      SERVICE_NAME: vma_mysql
    networks:
      - app-network

#Docker Networks
networks:
  app-network:
    driver: bridge

还有dockerfile

FROM php:7.2-apache-stretch
RUN apt-get update
RUN apt-get install -y libpng-dev libxml2-dev nano zip unzip
RUN docker-php-ext-install mbstring gd zip pdo pdo_mysql
COPY vma.conf /etc/apache2/sites-available/000-default.conf
WORKDIR /var/www/html/vma
COPY . .
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
RUN chmod -R 777 bootstrap storage public routes/pages.php
RUN composer install
EXPOSE 80

我在做什么错? 关于权限? 关于端口的事?

0 个答案:

没有答案