Using Devcontainer
The Municipio deployment repository contains configuration files for Dev Containers to enable a short path to getting a local development environment up and running.
The steps below should get you up and running a local site in a local environment:
Prerequisites
The following tools needs to be installed.
- VS Code
- VS Code Extension: Dev Containers
- Docker
Steps to setup
-
- Clone repo:
git clone git@github.com:municipio-se/municipio-deployment.git
- Open repo in VS Code.
- Copy
.devcontainer/.env.example
to.devcontainer/.env
and set the empty vairables. - Open the command palette and run command:
Devcontainers: Rebuild and Reopen in Container
- Open the terminal in VS Code.
- Run the following command:
composer install --prefer-source
.
This will install WordPress along with all plugins listed in composer.json. - When the command above is done, open the VS Code command palette and select
Tasks: Run Task
, then select the tasksetup:local site
.
This will run a number of tasks that seeds the database, sets up plugins and so on. For a complete overview of what actions are carried out, check out the./vscode/tasks.json
file. - Run the following command from the VS Code terminal:
php build.php
.
This step takes quite a while to perform. - Setup should now be done and you should be able to access your site. A link to the local site should be available under the “ports” tab.
- Clone repo:
Note that your comment will become public act.
Please give us your email address to get a reply on your feedback.