Package: waldcli
Welance Starter (ATM: CraftCMS 3.x + Docker)The project is the base to fork to create new projects using craft cms.
The repository contains:docker configuration for craft containerdocker-compose configuration to run the craft+mysql enviromentbase schema customization of the craft installationapache configurationbase template for craft frontendutility scripts to start/stop the enviromentutility scripts to import/export craft schema changesMore info about this project:here.InstallationTo install waldcli runpip install waldcliFor preview releases runpip install --extra-index-url https://test.pypi.org/simple/ waldcliWorkflowThe following is the standard workflow to use with the projects using craft/docker for development.0. Setup⚠️note:Execute point nr. 4, only if the setup has not yet been doneFork the starter project
create a fork of the latest release of the base repo :https://github.com/welance/welance-craft-starterInstall python/libs and bash completion (make sure to have python3 installed, usevirtualenvif necessary).run:pip install -r bin/requirements.txtto install the required libraries andsource bin/butler.bash-completionto enable commands autocompletionRunbin/butler.py setupscript. (required:docker). The script will ask for:!!! ATTENTION !!!customer and project number are used to setup the containers environment,
they cannot be easily changed once the project is on-going.Commit
commit the chagnes to the repository, in particular the changes reated to:./bin/.butler.json
./docker/docker-compose.yml
./docker/docker-compose-staging.yml1. DevelopmentDuring the development here are the most used commands:Start!Start The docker dev environmentbin/butler.py start --port [PORT_NUMBER]script starts the docker containersWork!The development phase of the project will involve 3 main resources:thetemplatesfoldertheconfig/project.yamlthepluginsfolderStop!Stop the docker dev environmentbin/butler.py stopstops the docker conatiners. It doesn't delete the database or cms data.Import/Export (Project/DB) SchemaThe schema is imported/exported automatically by Craft v3+ intoconfig/project.yml, so just make sure tommit itLocalPlugin Development:If you would like to develop a local plugin, we need to put it inside the plugins folder such as/plugins/VENDOR_NAME/PLUGIN_NAMEImport/Export database seedTo import/export the dump of the database that it is used to setup/seed the databasebin/butler.py seed-import -f=path/to/filebin/butler.py seed-export -f=path/to/filethe seed sql file is imported/exported frombuild/dump/base.sqlTODO: change this!Accessing the databaseSince the database use in the containers is not accessible from outside docker a database web interface is provided to dump/load/edit the database directly. The interface of the database isAdminerand
is available via http or https.The urls are:http://HOST/dbhttps://HOST/db.The parameters to log in are:System: MySQL or PostgreSQL depending on the driver selectedServer: databaseUsername: craftPassword: craftDatabase: craftApache configuration and .htaccessThe website apache configuration is stored in./docker/craft/conf/apache2/conf.d/welance.conf.
The welance.conf contains all the settings for the installation to work and should be taken as a reference
for production installation. By default .htaccess isDISABLED,because.
Changes to the apache configuration require to restart the environment (bin/butler.py local-stop,bin/butler.py local-start) to be enabled.Applying Craftcms updatesTODOTroubleshootingDocker: the project folder must be located in one of theDocker File Sharingpaths.
You can add a folder (for example the mamp one) by edit the prefernces of your docker installationCraftCMS: if you log in using HTTPS login with HTTP fails. This has someting to do with sessions
and CSRF protection. To solve the issue clear the browser application data and retry.Adminer: if you log in using HTTPS login with HTTP fails. This has someting to do with sessions
and CSRF protection. To solve the issue clear the browser application data and retry.SSLthe certificate shipped with the project has been created using:localhost:/# openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout welance.ssl.key -out welance.ssl.crt
Generating a 2048 bit RSA private key
....................+++
....................................................................+++
writing new private key to 'welance.ssl.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) []:DE
State or Province Name (full name) []:Berlin
Locality Name (eg, city) []:Berlin
Organization Name (eg, company) []:Welance
Organizational Unit Name (eg, section) []:
Common Name (eg, fully qualified host name) []:
Email Address []:info@welance.de2. Deploy on StagingFor staging environment are available the commands:bin/butler.py open-stagingthey are used by thewelance clerksystem3. Create a Release PackageTo create an tar.gz archive of the craft installation use the commandbin/butler.py release-packageit will create a filerelease.tar.gzfile in the root of the project containing
the craft installation with afresh database dumpin thebuild/dump/base.sqllocationProject removalOnce the project is finished to remove the resources associated with the project (containers and data)
thebin/butler.py teardownscript is provided.Licensehttps://commonsclause.com/