Skip to content

Commit 1723fb5

Browse files
committed
fix branch name
1 parent d367827 commit 1723fb5

26 files changed

+797
-0
lines changed

.docksal/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docksal-local.env
2+
docksal-local.yml

.docksal/commands/compile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
## Compile styleguide and site based on src
4+
##
5+
## Usage: fin compile
6+
7+
# Abort if anything fails
8+
set -e
9+
10+
source "${PROJECT_ROOT}/.docksal/commands/helpers"
11+
12+
#-------------------------- Execution --------------------------------
13+
14+
# Site updating
15+
echo -e "${green_bg} Step 1 ${NC}${green} Compiling...${NC}"
16+
17+
time -p compile
18+
19+
echo -e "${green_bg} DONE! ${NC}${green} Completed all compiling steps.${NC}"
20+
21+
#-------------------------- END: Execution --------------------------------

.docksal/commands/gulp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env sh
2+
3+
#: exec_target = node
4+
5+
## Execute gulp commands
6+
##
7+
## Usage: fin gulp
8+
9+
# Abort if anything fails
10+
set -e
11+
12+
source "${PROJECT_ROOT}/.docksal/commands/helpers"
13+
14+
cd "${PROJECT_ROOT}"
15+
16+
if [ ! -d "node_modules" ]
17+
then
18+
echo_yellow "Node modules don't exist."
19+
echo_green "Installing node modules..."
20+
21+
npm ci
22+
fi
23+
24+
#-------------------------- Execution --------------------------------
25+
26+
./node_modules/.bin/gulp ${@}

.docksal/commands/helpers

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
3+
## Define helpers for others scripts.
4+
##
5+
## No "fin" usage.
6+
7+
#-------------------------- Settings --------------------------------
8+
9+
PROJECT_ROOT="/var/www"
10+
11+
#-------------------------- END: Settings --------------------------------
12+
13+
#-------------------------- Helper functions --------------------------------
14+
15+
# Console colors
16+
red='\033[0;31m'
17+
green='\033[0;32m'
18+
green_bg='\033[1;97;42m'
19+
lavender_bg='\033[1;30;0;44m'
20+
yellow='\033[1;33m'
21+
NC='\033[0m'
22+
23+
echo_red () { echo -e "${red}$1${NC}"; }
24+
echo_green () { echo -e "${green}$1${NC}"; }
25+
echo_green_bg () { echo -e "${green_bg}$1${NC}"; }
26+
echo_lavender_bg () { echo -e "${lavender_bg}$1${NC}"; }
27+
echo_yellow () { echo -e "${yellow}$1${NC}"; }
28+
29+
30+
# Compile SCSS
31+
compile ()
32+
{
33+
#echo_green "Compiling"
34+
fin gulp
35+
}
36+
37+
#-------------------------- END: Helper functions --------------------------------

.docksal/commands/init

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
## Initialize stack and site (full reset)
4+
##
5+
## Usage: fin init
6+
7+
# Abort if anything fails
8+
set -e
9+
10+
source "${PROJECT_ROOT}/.docksal/commands/helpers"
11+
12+
#-------------------------- Execution --------------------------------
13+
14+
# Stack initialization
15+
echo -e "${green_bg} Step 1 ${NC}${green} Initializing stack...${NC}"
16+
fin project reset -f
17+
18+
# Site initialization
19+
echo -e "${green_bg} Step 2 ${NC}${green} Initializing site...${NC}"
20+
21+
time -p compile
22+
23+
echo -e "${green_bg} DONE! ${NC}${green} Completed all initialization steps.${NC}"
24+
25+
#-------------------------- END: Execution --------------------------------

.docksal/commands/npm

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env sh
2+
3+
#: exec_target = node
4+
5+
## Execute npm commands
6+
##
7+
## Usage: fin npm
8+
9+
# Abort if anything fails
10+
set -e
11+
12+
source "${PROJECT_ROOT}/.docksal/commands/helpers"
13+
14+
cd "${PROJECT_ROOT}"
15+
16+
#-------------------------- Execution --------------------------------
17+
18+
npm ${@}

.docksal/docksal-local.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Override virtual host (matches project folder name by default)
2+
VIRTUAL_HOST=ressources.esante.docksal.site
3+
4+
### -- Uncomment one of this line in your docksal-local.env file depending on your environment -- ###
5+
## For Docker Desktop ONLY
6+
#DOCKSAL_HOST_IP="$(ip route list default | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}')"
7+
## For Docker in WSL ONLY
8+
#DOCKSAL_HOST_IP=$(ip -4 address show dev eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
9+
## VPN
10+
#DOCKSAL_HOST_IP=$(powershell.exe '(Get-NetIPConfiguration | Where-Object { $_.InterfaceDescription -like "Juniper*"}).IPv4Address.IPAddress')
11+
## If you have a vEthernet (WSL) network interface
12+
#DOCKSAL_HOST_IP=$(netsh.exe interface ip show address "vEthernet (WSL)" | grep -E "Add?resse?" |sed -r 's/[^0-9.]//g')

.docksal/docksal-local.yml.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
# # Blackfire
3+
# blackfire:
4+
# extends:
5+
# file: ${HOME}/.docksal/stacks/services.yml
6+
# service: blackfire
7+
# # Memcache Admin panel
8+
# memcachedadmin:
9+
# image: alphayax/phpmemcachedadmin:latest
10+
# hostname: memcachedadmin
11+
# volumes:
12+
# - ./etc/memcachedadmin/Memcache.php:/var/www/html/Config/Memcache.php
13+
# labels:
14+
# - io.docksal.virtual-host=memcachedadmin.${VIRTUAL_HOST}

.docksal/docksal.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This is a shared configuration file that is intended to be stored in the project repo.
2+
# To override a variable locally:
3+
# - create .docksal/docksal-local.env file and local variable overrides there
4+
# - add .docksal/docksal-local.env to .gitignore
5+
#
6+
# After editing, apply changes with 'fin up'
7+
8+
# Use the default Docksal LAMP stack
9+
#DOCKSAL_STACK=default
10+
11+
# Override virtual host (matches project folder name by default)
12+
VIRTUAL_HOST=esante-ressources.docksal.site
13+
14+
# Lock images versions for LAMP services
15+
# This will prevent images from being updated when Docksal is updated
16+
NODE_IMAGE='node:12-alpine'
17+
18+
# Override document root ('docroot' by default)
19+
DOCROOT=styleguide

.docksal/docksal.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: "3.9"
2+
services:
3+
web:
4+
extends:
5+
file: ${HOME}/.docksal/stacks/services.yml
6+
service: apache
7+
extra_hosts:
8+
- "${VIRTUAL_HOST}:${DOCKSAL_HOST_IP}"
9+
labels:
10+
- io.docksal.virtual-host=${VIRTUAL_HOST},*.${VIRTUAL_HOST},${VIRTUAL_HOST}.*
11+
12+
# Compile sources
13+
node:
14+
image: ${NODE_IMAGE}
15+
volumes:
16+
- project_root:/var/www:rw,nocopy,cached # Project root volume
17+
labels:
18+
- io.docksal.user=node
19+
- io.docksal.shell=sh
20+
- io.docksal.project-root=${PROJECT_ROOT}
21+
environment:
22+
- PROJECT_ROOT=/var/www
23+
command: tail -F anything

0 commit comments

Comments
 (0)