GithubHelp home page GithubHelp logo

m151-template's Introduction

M151 - DB in Web-Applikation einbinden - Bootstrap-Repository

Dieses Repository dient als Startpunkt für das Modul M151 - DB in Web-Applikation einbinden.

Es definiert die für die Schüler-Infrastruktur notwendigen Dienste (Docker-Container, siehe `docker-compose.yml).

Benutzung mit docker:

# Starten aller Dienste:
$ docker-compose up

# (optional, da automatisch beim Start) Web-Applikation: Abhängigkeiten und Autoloader konfigurieren:
$ docker exec -ti m151-web composer install

Danach stehen folgende Dienste zur Verfügung:

Vagrant VM Build

Für die Schüler wird eine VM mittels Vagrant erstellt. Die VM ist mit einem Ubuntu mit XFCE-Desktop ausgestattet, und beinhaltet alles Notwendige für den Unterricht:

  • VS Code
  • docker
  • git

Erstellen/Starten der VM:

$ cd /pfad/zum/git-/repo
$ vagrant up --provider virtualbox

Dies erstelt eine VM für den Default Provider "virtualbox". VirtualBox muss dafür auf dem Host-PC installiert sein.

Stoppen der VM:

$ cd /pfad/zum/git-/repo
$ vagrant halt

Networking mit Vagrant

Die Box wird mit einenm Private Network konfiguriert: die VM hat die IP 10.10.10.10. somit sind die Container erreichbar über:

Wenn ein anderes/zusätzliches Netzwerk gewünscht wird, kann das im Vagrantfile angepasst werden.

Vagrant VMWare Builds

Um Images für VMWare Fusion / Desktop zu erstellen, sind ein paar extra Schritte notwendig:

Nun kann eine VM für VMWare erstellt werden:

$ vagrant up --provider vmware_desktop

PHP und XDebug

Wenn man XDebug benutzen will, um PHP-code im Web-container (m151-web) zu debuggen, ist folgendes anzupassen:

  • im File docker/web/php.ini muss die Remote-XDebug-IP gesetzt werden:
  • für Benutzung via lokalem Docker: xdebug.remote_host = host.docker.internal
  • den docker-web-Container neu bilden: docker-compose build web
  • den web-Container entfernen, neu starten: docker-compose kill web && docker-compose up -d web

(c) Alexander Schenkel, [email protected]

m151-template's People

Contributors

bylexus avatar

Watchers

James Cloos avatar  avatar  avatar

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.