Sign inSign up

0urob0r0s/webstack

By 0urob0r0s

•Updated over 5 years ago

Complete and easy to deploy WebStack (Also LAMP + FTP Compose Example)

Image
1

7.0K

0urob0r0s/webstack repository overview

⁠Details

The webstack by itself includes:

  • Apache v2.4
  • PHP v7.0.7 (full modules)

Mounts:

/var/www/html = Site Code / Virtualhosts Sites code /etc/apache2/sites-enabled = Virtualhosts *.conf files (will auto-deploy 000-default.conf if not exist) /mnt/script = Post-boot batch operations can be added to a script here

Notes:

  • If linked to a DB or loaded with specific environment variables it will try to catch parameters such as DBHOST,DBPORT,DBNAME,DBUSER,DBPASS etc and place them in: /tmp/.envdb
  • If loaded with specific environment variables such as USEREMAIL,USERPASS it will catch and place them in: /tmp/.envusr

⁠Running the Docker Image:

Minimal fresh deployment:

It will deploy the Webstack only.

Persistence of volumes: If mounted through volumes these will survive across container re-deployments.

docker run -it --name webstack
-v /volumes/webstack/site:/var/www/html
-v /volumes/webstack/site_config:/etc/apache2/sites-enabled
-v /volumes/webstack/script:/mnt/script
-d 0urob0r0s/webstack

Full Stack Docker Compose:

It will deploy the Webstack linked with a MariaDB and a FTP Server



version: '2'
services:
  WebStackDB:
    image: mariadb
    environment:
      MYSQL_PASSWORD: xxxxxxxxxxxx
      MYSQL_ROOT_PASSWORD: xxxxxxxxxxxx!
      MYSQL_USER: myusername
    stdin_open: true
    volumes:
    - /volumes/webstack/mysql:/var/lib/mysql
    tty: true
    ports:
    - 3306:3306/tcp
  WebStackFTP:
    image: stilliard/pure-ftpd:latest
    environment:
      FTP_USER_GID: '33'
      FTP_USER_HOME: /var/www/html
      FTP_USER_NAME: myusername
      FTP_USER_PASS: xxxxxxxxxxxx
      FTP_USER_UID: '33'
      PUBLICHOST: myhostname.com
      FTP_PASSIVE_PORTS: 30000:30010
    stdin_open: true
    volumes:
    - /volumes/webstack/site:/var/www/html
    - /volumes/webstack/site:/etc/ssl/private
    tty: true
    ports:
    - 21:21/tcp
    - 30000:30000/tcp
    - 30001:30001/tcp
    - 30002:30002/tcp
    - 30003:30003/tcp
    - 30004:30004/tcp
    - 30005:30005/tcp
    - 30006:30006/tcp
    - 30007:30007/tcp
    - 30008:30008/tcp
    - 30009:30009/tcp
    - 30010:30010/tcp
  WebStack:
    image: 0urob0r0s/webstack:latest
    stdin_open: true
    volumes:
    - /volumes/webstack/site:/var/www/html
    - /volumes/webstack/site_config:/etc/apache2/sites-enabled
    - /volumes/webstack/script:/mnt/script
    tty: true
    links:
    - WebStackDB:database
    - WebStackFTP:ftpserver
    ports:
    - 80:80/tcp

Final Notes:

  • FTP_USER_GID and FTP_USER_UID = 33 corresponds to www-data (user and group)
  • Ports 30000 to 30010 represent total slots for around 5 FTP PASV connections

Tag summary

Content type

Image

Digest

Size

121.3 MB

Last updated

about 8 years ago

docker pull 0urob0r0s/webstack