Giter Club home page Giter Club logo

packer-templates's Introduction

packer-templates

This respository is for maintaining my Vagrant Box Templates using Packer which create machine images running a LAMP-Stack.

If you want to create the LAMP box yourself, you can do so with the following command in the "lamp" directory:

packer build -except="vaground-cloud" -var "version=1.0.0" -var-file="debian-12.4-amd64.json" .\lamp.json

The pre-built virtual machine (Virtualbox) is available on Vagrant Cloud. To start the virtual machine you need VirtualBox at least v7.0 and Vagrant at least v2. I recommend the latest version v2.4.1.

Use the pre-built virtual machine by changing to a directory such as dev.local and initialize the box with Vagrant:

mkdir dev.local
cd dev.local
vagrant init -m manhart/lamp
vagrant up

The box uses symbolic links. Under Windows this has to be activated separately.

Vagrantfile Options

The following optional variables are available in the Vagrantfile to customize the box:

VM_NAME = 'dev.local';
VM_IP = '192.168.56.11';
VM_SSH_PORT = '22022';

If you want to use more or different virtual hosts, you can add them to the Vagrantfile. The associated self-signed SSL/TLS certificates are also created for each VHost, e.g.:

VM_CLEAR_HOSTS = true;
HOSTNAME = VM_NAME.split('.')[0];
VM_VHOSTS = [
    {
      "server_name": "#{HOSTNAME}.local",
      "server_alias": ["*.#{HOSTNAME}.local"],
      "document_root": "/virtualweb/#{HOSTNAME}.local",
      "enable_http": true,
      "enable_https": true,
      "env_vars": {
        "_RelativeRoot": "..",
        "_Stage": "develop",
        "_SQL_Host": "vagrant@localhost",
        "_DefaultSessionDuration": "14400"
      }
    },
    {
      "server_name": "app.local",
      "document_root": "/virtualweb/app.local",
      "enable_http": true,
      "enable_https": true,
      "env_vars": {
        "_RelativeRoot": "..",
        "_Stage": "develop",
        "_SQL_Host": "127.0.0.1",
        "_DefaultSessionDuration": "14400"
      }
    }
];

By default, the box is configured with the following user data:

Username: vagrant Password: vagrant

Installed Software

  • Debian 12.4
  • Apache 2.4.57
  • PHP 8.3, 8.2, 8.1, 7.4 with Xdebug 3, sqlsrv, pdo_sqlsrv and a lot more
  • MariaDB 10.11
  • Composer 2.6.6
  • Node.js 20.11
  • MailCatcher 0.8.0
  • phpMyAdmin 5.2.1
  • mysqltuner 2.2.12

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.