Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

"Page not found" error when running symfony 4.4 web server in docker

$
0
0

I'm having troubles with docker which I'm beginning to learn.I know I won't use symfony web server in production, in a real life project, but for now, symfony web server is what I need. Just so you know, when I run symfony server:start command line outside of docker, everything works fine. All routes are ok.The problem comes when I try using the web server with docker. No routes are found. Even this one : "/" .Here's my docker-compose.yml

version: "3.3"services:  app:    container_name: app    build:         context: .        dockerfile: Dockerfile    ports:      - 8000:8000    volumes:      - .:/app/  postgres:    container_name: postgres    image: postgres:10.2    environment:      - POSTGRES_DATA_HOST=${POSTGRES_DATA_HOST}      - POSTGRES_USER=${POSTGRES_USER}      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}      - POSTGRES_DB=${POSTGRES_DB}

And here's the Dockerfile

FROM php:zts-busterRUN apt-get update && apt-get install -y \    wget \    sudo \    libpq-dev \     nano# composer is installed globally in directory user/bin. The command is named composerRUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composerRUN wget https://get.symfony.com/cli/installer -O - | bash && \    mv /root/.symfony/bin/symfony /usr/local/bin/symfonyRUN docker-php-ext-install pdo pdo_pgsqlWORKDIR /app/COPY ./ /app/RUN composer installCMD [ "symfony", "serve", "--port=8000", "&&", "symfony", "open:local"]

Could you help figure out what's wrong with my config ?Many thanks for your help !!


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>