Coder Social home page Coder Social logo

covex-nn / docker-workflow-symfony Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 14.0 1.27 MB

Symfony Flex application skeleton with docker-compose support, bootstrapped by Environment Configurator

Home Page: https://github.com/covex-nn/env-configurator/issues/10

License: MIT License

PHP 100.00%
docker docker-compose php72 symfony

docker-workflow-symfony's People

Contributors

covex-nn avatar stefandoorn avatar tupikoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-workflow-symfony's Issues

PHP deps not installed from scratch

Hello! I'm starting with this tutorial and cannot pass even getting started.

I'm using osx 10.16.2, homebrew and docker 18.06.1. My log here:

brew install docker docker-machine docker-machine-nfs

docker-machine create --driver virtualbox default
docker-machine start default
docker-machine env default
sudo nano /etc/hosts # "192.168.99.100  sci.mytld"
eval $(docker-machine env default)
docker-machine-nfs default

cd ~
rm -rf ~/Desktop/sci
git clone [email protected]:covex-nn/docker-workflow-symfony.git ~/Desktop/sci
cd ~/Desktop/sci

# Replace "docker.local" with "sci.mytld"
nano ./.travis.yml
nano ./Dockerfile-nginx
nano ./README.md

docker-compose up -d
docker-compose exec php phing # <=== Problem is here

And error is pretty simple: ERROR: No such service: php

$ docker-compose ps
      Name                   Command             State               Ports
---------------------------------------------------------------------------------------
sci_mysql_1        docker-entrypoint.sh mysqld   Up      0.0.0.0:3306->3306/tcp
sci_phpmyadmin_1   /run.sh supervisord -n        Up      0.0.0.0:8080->80/tcp, 9000/tcp

Tried later to use compose override file like this:

# ..... same clean setup .....
cp docker-compose.override.yml.dist docker-compose.override.yml
docker-compose up -d
docker-compose exec php phing # <=== Problem still here

But log is another:

$ docker-compose exec php phing
Buildfile: /srv/build.xml
 [property] Loading /srv/.env

Docker Symfony App > which-nc:


Docker Symfony App > database-ready:

     [echo] Waiting for a database on 'mysql:3306'...
DNS fwd/rev mismatch: mysql != sci_mysql_1.sci_default
mysql [172.18.0.2] 3306 (?) : Connection refused
    [retry] Attempt [0]: error occurred; retrying after 1 s...
DNS fwd/rev mismatch: mysql != sci_mysql_1.sci_default
mysql [172.18.0.2] 3306 (?) : Connection refused
    [retry] Attempt [1]: error occurred; retrying after 1 s...
DNS fwd/rev mismatch: mysql != sci_mysql_1.sci_default
mysql [172.18.0.2] 3306 (?) open
     [echo] Database is ready!

Docker Symfony App > database-deploy:

PHP Warning:  require(/srv/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /srv/bin/console on line 12
PHP Stack trace:
PHP   1. {main}() /srv/bin/console:0
PHP Fatal error:  require(): Failed opening required '/srv/bin/../vendor/autoload.php' (include_path='.:/usr/share/php') in /srv/bin/console on line 12
PHP Stack trace:
PHP   1. {main}() /srv/bin/console:0

BUILD FAILED
/srv/build.xml:25:99: Task exited with code 255

Total time: 2.2074 seconds

I guess, that here is two problems: not installed dependencies and no communication between php and mysql images. Why?


I'm newbie to docker-like-stuff, so, i don't know why php service doesn't start and how to fix it.
Globally trying to configure autodeploy symfony flex app with my GitLabCI.

Any ideas?

На Mac OS при использовании docker-machine появляется проблема

На Mac OS при использовании docker-machine появляется проблема с доступами к файлам, описанная здесь: boot2docker/boot2docker#581
Проявляется в том, что владелец и права на файлы не меняются, на примонтированных nfs томах, Symfony не может запуститься (не может писать в /var/cache/dev/)
Решается: https://github.com/adlogix/docker-machine-nfs:

  1. Устанавливаем: brew install docker-machine-nfs
  2. Запускаем: docker-machine-nfs default

Спасибо за ваше решение.
Будет здорово, если добавите это инфо про macos, может кому то пригодится

PackageVersions could not locate your composer.lock location

Хочу доточить для mac и сделать pull-request

Ниже с чем столкнулся. По стандартным путям composer.lock не находится. Как лучше фиксить? Вариант топорный - symlink сделать или вернуть на стандартный путь composer.lock
Почему вы composer --no-scripts сделали?

[symfonyconsole] executing bin/console doctrine:migrations:migrate --env=dev --no-interaction --allow-no-migration
[2017-10-04 10:33:00] doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' [] []
[2017-10-04 10:33:00] doctrine.DEBUG: SELECT version FROM migration_versions [] []
[2017-10-04 10:33:00] doctrine.DEBUG: SELECT version FROM migration_versions WHERE version IN ('20170706161000') ORDER BY version DESC LIMIT 1 [] []
[2017-10-04 10:33:00] doctrine.DEBUG: SELECT version FROM migration_versions [] []
[2017-10-04 10:33:00] doctrine.DEBUG: "START TRANSACTION" [] []
[2017-10-04 10:33:00] doctrine.DEBUG: "ROLLBACK" [] []
[2017-10-04 10:33:00] console.ERROR: Error thrown while running command "doctrine:migrations:migrate --env=dev --no-interaction --allow-no-migration". Message: "PackageVersions could not locate your `composer.lock` location. This is assumed to be in ["\/composer\/vendor\/ocramius\/package-versions\/src\/PackageVersions\/..\/..\/..\/..\/..\/composer.lock","\/composer\/vendor\/ocramius\/package-versions\/src\/PackageVersions\/..\/..\/composer.lock"]. If you customized your composer vendor directory and ran composer installation with --no-scripts, then you are on your own, and we can't really help you. Fix your shit and cut the tooling some slack." {"error":"[object] (UnexpectedValueException(code: 0): PackageVersions could not locate your `composer.lock` location. This is assumed to be in [\"\\/composer\\/vendor\\/ocramius\\/package-versions\\/src\\/PackageVersions\\/..\\/..\\/..\\/..\\/..\\/composer.lock\",\"\\/composer\\/vendor\\/ocramius\\/package-versions\\/src\\/PackageVersions\\/..\\/..\\/composer.lock\"]. If you customized your composer vendor directory and ran composer installation with --no-scripts, then you are on your own, and we can't really help you. Fix your shit and cut the tooling some slack. at /composer/vendor/ocramius/package-versions/src/PackageVersions/FallbackVersions.php:56)","command":"doctrine:migrations:migrate --env=dev --no-interaction --allow-no-migration","message":"PackageVersions could not locate your `composer.lock` location. This is assumed to be in [\"\\/composer\\/vendor\\/ocramius\\/package-versions\\/src\\/PackageVersions\\/..\\/..\\/..\\/..\\/..\\/composer.lock\",\"\\/composer\\/vendor\\/ocramius\\/package-versions\\/src\\/PackageVersions\\/..\\/..\\/composer.lock\"]. If you customized your composer vendor directory and ran composer installation with --no-scripts, then you are on your own, and we can't really help you. Fix your shit and cut the tooling some slack."} []
[2017-10-04 10:33:00] console.DEBUG: Command "doctrine:migrations:migrate --env=dev --no-interaction --allow-no-migration" exited with code "1" {"command":"doctrine:migrations:migrate --env=dev --no-interaction --allow-no-migration","code":1} []

                                                                                                                                 
  [UnexpectedValueException]                                                                                                     
  PackageVersions could not locate your `composer.lock` location. This is assumed to be in ["\/composer\/vendor\/ocramius\/pack  
  age-versions\/src\/PackageVersions\/..\/..\/..\/..\/..\/composer.lock","\/composer\/vendor\/ocramius\/package-versions\/src\/  
  PackageVersions\/..\/..\/composer.lock"]. If you customized your composer vendor directory and ran composer installation with  
   --no-scripts, then you are on your own, and we can't really help you. Fix your shit and cut the tooling some slack.           
                                                                                                                                 

doctrine:migrations:migrate [--write-sql] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<version>]

[symfonyconsole] 
                    Application Migrations


Migrating up to 20170706161000 from 0
Migration 20170706161000 failed during Pre-Checks. Error PackageVersions could not locate your `composer.lock` location. This is assumed to be in ["\/composer\/vendor\/ocramius\/package-versions\/src\/PackageVersions\/..\/..\/..\/..\/..\/composer.lock","\/composer\/vendor\/ocramius\/package-versions\/src\/PackageVersions\/..\/..\/composer.lock"]. If you customized your composer vendor directory and ran composer installation with --no-scripts, then you are on your own, and we can't really help you. Fix your shit and cut the tooling some slack.

Fails on / in branch names

$ docker build --cache-from $CI_DEV_IMAGE_WITH_TAG --tag $CI_DEV_IMAGE_WITH_TAG --target dev .
invalid argument "registry.gitlab.com/project/repo/dev:ci/behat" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
ERROR: Job failed: exit code 125

I think $CI_COMMIT_REF_SLUG should be used instead of $CI_COMMIT_REF_NAME: https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-variables. The SLUG is stripped from anything that is potentially incompatible I think.

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.