Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
projectoperations committed Nov 4, 2023
0 parents commit ffd6f00
Show file tree
Hide file tree
Showing 104 changed files with 14,683 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
end_of_line = LF
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2
111 changes: 111 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# File
#
# This file contains environment specific variables for local-docker containers and commands.

################
# General setup
PROJECT_NAME=
LOCAL_DOMAIN=
DRUSH_OPTIONS_URI=

# Set the verboseity level of local-docker:
# 0 = least output
# 1 = explain where necessary
# 2 = show even most commands sent to container(s) [default]
LD_VERBOSE=2

# IP address where the containers exposed ports are bind.
# WARNING: IP address 0.0.0.0 will bind the ports to all of your
# laptop's network interfaces - effectively allowing anyone to
# connect to your container ports - Nginx, databases etc. alike.
LOCAL_IP=127.0.0.1
# Some locations.
DATABASE_DUMP_STORAGE=db_dumps
APP_ROOT=app


################################
#### DOCKER CONTAINERS CONF ####

# To combine multiple YAML files (for overrides) you may add
# them one after another (colon separated list):
# COMPOSE_FILE=docker-compose.yml:docker-compose.override.yml
# This equals running docker-compose with:
# docker-compose -f docker-compose.yml -f docker-compose.overrides.yml ...
COMPOSE_FILE=docker-compose.yml

# Some container names used in ld.sh..
CONTAINER_DB=db
CONTAINER_PHP=php
CONTAINER_NGINX=nginx
CONTAINER_SOLR=solr

# Set value to 1 to use nodejs (checked before the command is run)
CONTAINER_NODEJS_START=0

# Exposed container ports.
CONTAINER_PORT_WEB=80
CONTAINER_PORT_DB=3306
CONTAINER_PORT_VARNISH=8017

# Should match PHP container's www-data -user (from php:7.3-fpm-alpine et.al.).
# This is used solely by docker-sync.
DOCKER_SYNC_UID=82
DOCKER_SYNC_GID=82


#################################
##### Database configuration ####

MYSQL_ROOT_PASSWORD=root_password

MYSQL_DATABASE=drupal
MYSQL_USER=drupal
MYSQL_PASSWORD=drupal

#DB_HOSTNAME=db
#DB_PORT=3306
#DB_DRIVER=mysql

############################
##### PHP configuration ####

# NOTE: Variables PHP_* are used in PHP's INI files:
# docker/build/php/*/conf.d/95-drupal-development.ini

# Do not use name PHP_VERSION for the variable, it collides with PHP internals.
# Valid options are 7.1, 7.2 (see build file paths in docker/build/php).
# Changes to this value will take effect only after buiding PHP container:
# $ docker-compose up -d --build php
# Valid values: 7.1, 7.2, 7.3, 7.4
PROJECT_PHP_VERSION=

# Let the composer run as root without constant complaining.
COMPOSER_ALLOW_SUPERUSER=1
# Unset the composer memory limit by default.
COMPOSER_MEMORY_LIMIT=-1

# These are used (if are) during php container build phase.
# changing these values should be followed by either:
# $ ./ld rebuild (re-syncs also sync-containers, takes a few minutes)
# or:
# $ docker-compose up -d --build (faster)
PHP_MEMORY_LIMIT=1536M


################
#### Xdebug ####
PHP_XDEBUG_REMOTE_ENABLE=0
# Hostname ´host.docker.internal´ resolves to host machine
# in containers.
PHP_XDEBUG_REMOTE_HOST=host.docker.internal
# Port `9010` is being used to avoid collision with possible php-fpm
# running on the host.
PHP_XDEBUG_REMOTE_PORT=9010
# Logging is off by default as the log file may grow quite a bit in short time.
#PHP_XDEBUG_REMOTE_LOG=/var/www/xdebug.log

#################################
##### Solr configuration ########
# Core name. Must have a value!
SOLR_CORE=drupal
4 changes: 4 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# File
#
# This file contains environment specific variables for local-docker containers and commands.
# You can use this file to locally override some values in ./.env
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Overview

## What are the steps required to reproduce the bug?

## What behavior were you expecting?

## What happened instead?

## Proposed solution

## This issue is resolved when:
- [ ] ...
- [ ] ...
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Before submitting your PR, please review the following checklist:

- [ ] Keep pull request small so it can be easily reviewed.
- [ ] Refer to the related issue (`#123`) in PR description.
- [ ] Describe the proposed changes.

122 changes: 122 additions & 0 deletions .github/workflows/macos-latest--tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Test build and commands with macOS-latest

on:
pull_request:
branches:
- main

jobs:
build:

runs-on: macOS-latest

steps:
- uses: actions/checkout@v1

- name: Tell about the workflow
if: github.event_name == 'pull_request'
run: echo This event is a pull request. Test build ./ld init.

- name: Check the current user's name and home folder path
run: whoami

- name: What shell is being used
run: |
echo $0
ls -lha ~/.ba*
- name: Verify virtualisation is supported
run: sysctl kern.hv_support

- name: Check Virtualbox path
run: which virtualbox

- name: Check lo0
run: ifconfig lo0

- name: Install docker, docker-compose, docker-machine, boot2docker{,-cli}
run: |
brew install docker
brew install docker-compose
brew install docker-machine
brew install boot2docker boot2docker-cli
- name: Check paths of docker-* binaries
run: |
echo -n 'docker installed in path: ' && which docker
echo -n 'docker-compose installed in path: ' && which docker-compose
echo -n 'docker-machine installed in path: ' && which docker-machine
- name: Create image cache for Docker
run: mkdir -p ~/.docker/machine/cache/

- name: Download Boot2Docker iso image
run: |
cd ~/.docker/machine/cache/
curl -Lo boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.5/boot2docker.iso
ls -lha
file boot2docker.iso
- name: Create machine 'default' with Virtualbox
run: |
docker-machine create --driver virtualbox --virtualbox-boot2docker-url ~/.docker/machine/cache/boot2docker.iso default
echo "----"
docker-machine ls
- name: Install docker-sync
run: |
gem install docker-sync --user-install
GEMPATH=$(gem env | grep 'USER INSTALLATION DIRECTORY' | cut -d: -f2 | tr -d ' ')/bin
echo GEMPATH=$GEMPATH
echo "export PATH=\"\$PATH:$GEMPATH\"" >> ~/.bashrc
source ~/.bashrc
echo $PATH
echo -n 'docker-sync installed in path: ' && which docker-sync
docker-sync
- name: List what is in the project folder.
run: |
pwd
ls -lha
file ld
file ld.sh
- name: Export and source docker machine environment ('default', .bashrc)
run: |
docker-machine env default >> ~/.bashrc
echo "COMPOSE_INTERACTIVE_NO_CLI=0" >> ~/.bashrc
echo "echo Sourced file ~/.bashrc "$(date) >> ~/.bashrc
- name: Source docker machine environment ('default', .bashrc)
run: |
echo "PATH="$PATH
echo "DOCKER_TLS_VERIFY="$DOCKER_TLS_VERIFY
echo "DOCKER_HOST="$DOCKER_HOST
echo "DOCKER_CERT_PATH="$DOCKER_CERT_PATH
echo "DOCKER_MACHINE_NAME="$DOCKER_MACHINE_NAME
echo "COMPOSE_INTERACTIVE_NO_CLI="$COMPOSE_INTERACTIVE_NO_CLI
echo "==== sourcing .bashrc \/ \/ ==="
source ~/.bashrc
echo "==== sourcing .bashrc /\ /\ ==="
echo "PATH="$PATH
echo "DOCKER_TLS_VERIFY="$DOCKER_TLS_VERIFY
echo "DOCKER_HOST="$DOCKER_HOST
echo "DOCKER_CERT_PATH="$DOCKER_CERT_PATH
echo "DOCKER_MACHINE_NAME="$DOCKER_MACHINE_NAME
echo "COMPOSE_INTERACTIVE_NO_CLI="$COMPOSE_INTERACTIVE_NO_CLI
- name: Print ./ld help
run: |
source ~/.bashrc
echo "DOCKER_HOST="$DOCKER_HOST
echo "COMPOSE_INTERACTIVE_NO_CLI="$COMPOSE_INTERACTIVE_NO_CLI
./ld
- name: Run ./ld init
run: |
source ~/.bashrc
echo "DOCKER_HOST="$DOCKER_HOST
echo "COMPOSE_INTERACTIVE_NO_CLI="$COMPOSE_INTERACTIVE_NO_CLI
./ld init
52 changes: 52 additions & 0 deletions .github/workflows/ubuntu-18.04--tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test build and commands with ubuntu-18.04

on:
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1

- name: Run a one-line script
if: github.event_name == 'pull_request'
run: echo This event is a pull request. Test build ./ld init.


- name: Get versions of Docker and docker-compose
run: |
echo "NEXT: Wait for docker to wake up"
while ! docker system info > /dev/null 2>&1; do docker system info && ROUND=1 && echo "Waiting Docker.app to start, round ${ROUND}" && sleep 2 && (( ROUND + 1 )) ; done
echo 'Docker.app should be now running...'
which docker || echo 'no docker in path'
[ -f /usr/bin/docker ] || exit 1
docker system info
docker ps
docker-compose --version
- name: Install Ruby
run: |
sudo apt-get update
sudo apt --fix-missing install ruby-full
which gem
- name: Install docker-sync (depencency)
run: |
sudo gem install docker-sync
which docker-sync
- name: List what is in the project folder.
run: ls -lha

- name: Check the type of ld
run: file ld

- name: Run init and see where it gets us
run: ./ld init

18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file contains default .gitignore rules. To use it, copy it to .gitignore,
# and it will cause files like your Docker-sync cache and environment specific
# configuration (.env.local file) to be excluded from Git version control.
# This is a common strategy to avoid accidentally including private information
# in public repositories and patch files.

# Also note that subdirectories may and do have their own .gitignore files
# affecting content in these directories and their subdirectories further down
# in the tree hierarchy.

# See db_dumps/.gitignore
# See app/.gitignore

.DS_Store
.idea
.docker-sync
.env.local
app/xdebug.log
18 changes: 18 additions & 0 deletions .gitignore.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file contains default .gitignore rules. To use it, copy it to .gitignore,
# and it will cause files like your Docker-sync cache and environment specific
# configuration (.env.local file) to be excluded from Git version control.
# This is a common strategy to avoid accidentally including private information
# in public repositories and patch files.

# Also note that subdirectories may and do have their own .gitignore files
# affecting content in these directories and their subdirectories further down
# in the tree hierarchy.

# See db_dumps/.gitignore
# See app/.gitignore

.DS_Store
.idea
.docker-sync
.env.local

Loading

0 comments on commit ffd6f00

Please sign in to comment.