Mein Betriebssystem ist Windows 7 und ich verwende Docker Toolbox. Ich folgte this Tutorial, aber dann steckte ich fest, wenn ich versuchte, die Webseite zu öffnen, weil mein Browser sagte, es konnte keine Verbindung herstellen.Phalcon-Compose & Docker Toolbox Web-Server sieht keine Dateien
variables.env (der Rest ist Standard):
# Application
WEB_DOCUMENT_ROOT=/project/public
WEB_ALIAS_DOMAIN=localhost
APPLICATION_CACHE=/project/cache
APPLICATION_LOGS=/project/logs
# production | development | staging | testing
APPLICATION_ENV=development
Gastgeber:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
Dann fand ich, dass es ein Programm namens Kitematic, die mit Docker Tools installiert worden war, so dass ich es geöffnet und sah alle meine Behälter. Ich ging zu „wildlife_app_1“, das ist meine Web-Server und sah eine Konsole mit einer Warnung drin:
[WARNING] WEB_DOCUMENT_ROOT does not exists with path "/project/public"!
Es gab eine Taste „exec“ genannt, die einen Behälter Terminal öffnen können, so öffnete ich es und ich festgestellt, dass es in "/ project" eigentlich kein solches Verzeichnis wie "public" gab.
Kann jemand das beheben? Danke im Voraus!
Danke dafür, sagt Kitematic, dass die Website auch bei http://192.168.99.100/ befindet. Nun ist das Problem, dass Dateien und Verzeichnisse nicht aus dem Ordner meines Projekts in den Container kopiert werden, so dass der Server sie finden und arbeiten kann. – Razip
Versuchen Sie App ohne Kitematic zu starten, indem Sie 'docker-compose up ...' verwenden. – klay
Ich starte meine App nicht mit Kitematic, ich beginne mit "docker-compose up -d", wie es in dem Handbuch geschrieben wurde, dem ich gefolgt bin . – Razip