Giter Club home page Giter Club logo

docker-symfony4's Introduction

Hi there, I'm Pierre-Henri ๐Ÿ‘‹

I am a Web Developper and I love ๐Ÿ’ป & ๐Ÿˆโ€โฌ›

  • ๐Ÿ”ญ Iโ€™m currently working on Staysail, a personnal project around a sailing community
  • ๐ŸŒฑ Iโ€™m currently learning Rust, Go an everything I can
  • ๐Ÿ“ซ How to reach me: here or on Linkedin
  • โšก Fun fact: I sailed for a year on my sailing boat โ›ต

SkillIcons

docker-symfony4's People

Contributors

bourdeau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-symfony4's Issues

volume xxx is used in service "symfony" but no declaration was found in the volumes section.

i get error
ERROR: Named volume "home/grek/PhpstormProjects/mea.crm4:/var/www/app:rw" is used in service "symfony" but no declaration was found in the volumes section.

.evn

SYMFONY_PATH=home/grek/PhpstormProjects/mea.crm4
DB_ROOT_PASS=bralion
SYMFONY_DB_NAME=bralion
SYMFONY_DB_USER=root
SYMFONY_DB_PATH=123

docker-compose.yml

version: "2"

services:

   symfony:
     build: php-7.2 # You can also use ubuntu-17.10
     container_name: itbcode_bralion_symfony
     ports:
       - "8080:80"
     expose:
         - "80"
     restart: always
     volumes:
         - ${SYMFONY_PATH}:/var/www/app
     # https://stackoverflow.com/questions/37100358/docker-composer-exited-with-code-0
     tty: true
     depends_on:
         - db

   db:
     image: mysql:5.7
     container_name: itbcode_bralion_mysql
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
       MYSQL_DATABASE: ${SYMFONY_DB_NAME}
       MYSQL_USER: ${SYMFONY_DB_USER}
       MYSQL_PASSWORD: ${SYMFONY_DB_PATH}
     ports:
         - "3307:3306"
     expose:
         - "3306"

volumes:
    db_data:

php-7.2/app.conf

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /var/www/app/public
    <Directory /var/www/app/public>
        Options -Indexes
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

php-7.2/app.conf

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /var/www/app/public
    <Directory /var/www/app/public>
        Options -Indexes
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

php-7.2/Dockerfile

FROM php:7.2.1-apache

MAINTAINER Pierre-Henri Bourdeau

# Debian dep
RUN apt-get update
RUN apt-get install -y vim

# Install php extensions
RUN docker-php-ext-install pdo pdo_mysql

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && chmod +x /usr/local/bin/composer

# Bashrc
RUN rm /root/.bashrc
ADD .bashrc /root/.bashrc

# Cleaning
RUN rm -rf /etc/apache2/sites-available/* && rm -rf /etc/apache2/sites-enabled/*
RUN rm -rf /var/www/*

# Conf Apache2
RUN mkdir /var/www/app
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
ADD app.conf /etc/apache2/sites-available/app.conf
RUN usermod -u 1000 www-data
RUN a2ensite app.conf
RUN service apache2 restart

WORKDIR /var/www/app


EXPOSE 80

Page default Ubuntu

Hello, I started with Docker, I installed your solution for symfony, but I have a problem, after my docker-compose -up, it's the default page of ubuntu / apache3 that I do not have that of symfony . Do you have an idea to solve the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.