Skip to content

Commit c7a7876

Browse files
gregharveynfawbertDionisioFGdavids4David Suissa
authored
Cgroup fixes pr devel (#114)
* Fix docker-compose v2 issue and re-release to include clamav role (#68) * Killing old ce-dev container when updating (#70) * Added Drupal9 and Localgov templates (#73) * New release 1.1.19 (#75) * Updated package.json version: 1.1.19 (#77) * Updated package.json version: 1.1.19 * New tag to fix repo key for Chrome (#83) * #CE-62820: Added support for composer '2.x' in Drupal 9 provision tem… (#89) (#91) * #CE-62820: Added support for composer '2.x' in Drupal 9 provision template. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'new_user' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'key_name' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default values for 'ce_deploy' in provision. Co-authored-by: David Suissa <[email protected]> Co-authored-by: David Suissa <[email protected]> * REL 1.1.21: Using composer 2 with Drupal 9 by default (#92) * Drupal template fixes pr 1.x (#94) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * CE-DEV: some updates and tweaks (#96) * Renamed the settings and drush files for ce-dev * Added nodejs 16.x as default version * Added lhci_run role by default * Some tweaks in the config * Added the if statement to read info from an optional settings.local.php file * Release 1.1.23 (#97) * Bump minimist from 1.2.5 to 1.2.6 (#79) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ansi-regex from 3.0.0 to 3.0.1 (#84) Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](chalk/ansi-regex@v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump moment from 2.27.0 to 2.29.4 (#85) Bumps [moment](https://github.com/moment/moment) from 2.27.0 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](moment/moment@2.27.0...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Changing 'set-current' choice to a valid one. * Fixing ce_provision vars in container builds. (#102) * Adding variables pr 1.x (#104) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding variables pr 1.x (#106) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Adding variables pr 1.x (#109) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Still missing some vars. * Adding variables pr 1.x (#111) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Still missing some vars. * Setting older version of Ubuntu for containers. * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. * Bump minimatch from 3.0.4 to 3.1.2 (#107) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. (#113) * Documentation update for docker composer v2. * Temporarily disabling LHCI for Drupal 9 due to an HTML issue. * Preparing release of 1.2.0. * Updating release version in package.json. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: nfawbert <[email protected]> Co-authored-by: Dionisio <[email protected]> Co-authored-by: davids4 <[email protected]> Co-authored-by: David Suissa <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kristjan Lilleoja <[email protected]> Co-authored-by: Kristjan Lilleoja <[email protected]>
1 parent 0b9b749 commit c7a7876

31 files changed

+76
-57
lines changed

.github/workflows/ce-dev-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
mkdir -p ~/.config/ce-dev
3838
touch ~/.config/ce-dev/preferences-1.x.yml
3939
echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-1.x.yml
40-
echo 'docker_compose_bin: docker-compose' >> ~/.config/ce-dev/preferences-1.x.yml
40+
echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-1.x.yml
4141
echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-1.x.yml
4242
- name: Build and push Docker images
4343
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A local stack based on Docker Compose and Ansible. It aims to be easy to use but
1616
- HTTPS support through [mkcert](https://github.com/FiloSottile/mkcert)
1717
- Built-in Unison sync to avoid bind mount slowness on Mac OS
1818
- Easily build and push ready made images from running containers for you project
19-
- Only defines a few simple commands, and defers to docker-compose and Ansible beyond that
19+
- Only defines a few simple commands, and defers to `docker compose` and Ansible beyond that
2020

2121
## [Documentation](https://codeenigma.github.io/ce-dev-docs/1.x/home/)
22-
## [Install](https://codeenigma.github.io/ce-dev-docs/1.x/install/)
22+
## [Install](https://codeenigma.github.io/ce-dev-docs/1.x/install/)

RELEASE

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
1-
1.1.23
2-
Changed credentials_handling to manual, to generate ce-dev and root as user/password instead of a random string.
3-
Using vendor/drush as drush instead of the phar file.
4-
Included lhci_run as role in the deploy step, with one tests for the homepage.
5-
Using full command paths to define pre/post_tasks
6-
Renamed the settings and drush templates inside ansible/web/site/default
7-
Removed the pre_tasks in provision.yml to uninstall nodejs 12.
1+
1.2.0
2+
Migrated to using docker compose v2 or higher.

docs/Commands.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,21 @@ _See code: [src/commands/browse.ts](https://github.com/codeenigma/ce-dev/blob/v1
5757

5858
## `ce-dev build`
5959

60-
Commit the existing containers as new docker images, and create a new docker-compose file referencing them.
60+
Commit the existing containers as new docker images, and create a new docker compose file referencing them.
6161

6262
```
6363
USAGE
6464
$ ce-dev build
6565
6666
OPTIONS
67-
-d, --destination=destination [default: ce-dev.compose.prebuilt.yml] Path to the output docker-compose file, relative
67+
-d, --destination=destination [default: ce-dev.compose.prebuilt.yml] Path to the output docker compose file, relative
6868
to the project ce-dev folder.
6969
7070
-h, --help show CLI help
7171
7272
-r, --registry=registry Docker registry to use. This overrides the one defined in the source compose template.
7373
74-
-t, --template=template [default: ce-dev.compose.yml] Path to a docker-compose template file, relative to the
74+
-t, --template=template [default: ce-dev.compose.yml] Path to a docker compose template file, relative to the
7575
project ce-dev folder. WARNING: this must match the original one the project was
7676
constructed with.
7777
@@ -151,7 +151,7 @@ _See code: [src/commands/deploy.ts](https://github.com/codeenigma/ce-dev/blob/v1
151151

152152
## `ce-dev destroy`
153153

154-
Destroy project's containers using docker-compose kill.
154+
Destroy project's containers using docker compose kill.
155155

156156
```
157157
USAGE
@@ -194,7 +194,7 @@ USAGE
194194
OPTIONS
195195
-h, --help show CLI help
196196
197-
-t, --template=template [default: ce-dev.compose.prebuilt.yml] path to a docker-compose template file, relative to
197+
-t, --template=template [default: ce-dev.compose.prebuilt.yml] path to a docker compose template file, relative to
198198
the project root
199199
200200
EXAMPLE
@@ -231,7 +231,7 @@ OPTIONS
231231
232232
-r, --registry=registry Docker registry to use. This overrides the one defined in the source compose template.
233233
234-
-t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker-compose template file, relative to
234+
-t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker compose template file, relative to
235235
the project root. WARNING: this must match the original one the project was constructed with.
236236
237237
-u, --username=username Username to use to login against the Docker registry.
@@ -259,7 +259,7 @@ OPTIONS
259259
260260
-r, --registry=registry Docker registry to use. This overrides the one defined in the source compose template.
261261
262-
-t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker-compose template file, relative to
262+
-t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker compose template file, relative to
263263
the project root. WARNING: this must match the original one the project was constructed with.
264264
265265
-u, --username=username Username to use to login against the Docker registry.
@@ -292,7 +292,7 @@ _See code: [src/commands/shell.ts](https://github.com/codeenigma/ce-dev/blob/v1.
292292

293293
## `ce-dev start`
294294

295-
Spin up containers using docker-compose and update /etc/hosts file.
295+
Spin up containers using docker compose and update /etc/hosts file.
296296

297297
```
298298
USAGE

docs/GettingStarted.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Getting started
22

3-
Note: this tutorial always refers to `docker` and `docker-compose`, never to `sudo docker` and `sudo docker-compose`, for readability. Adapt the commands accordingly for your setup.
3+
Note: this tutorial always refers to `docker` and `docker compose`, never to `sudo docker` and `sudo docker compose`, for readability. Adapt the commands accordingly for your setup.
44
We also use indifferently "host", "host machine", "laptop" or "workstation" to refer to the machine you're using ce-dev on; and "guest", "container" or "service" to refer to running containers. It will still work the same whether you actually use a laptop or not &#128521;
55

66
## Quickstart
@@ -38,7 +38,7 @@ Next step is to start our containers.
3838
ce-dev start
3939
```
4040
What happened is:
41-
- we called `docker-compose up`
41+
- we called `docker compose up`
4242
- ensured file permissions, ownership and uid/gid match between your user on the host and the 'ce-dev' user within the container
4343
- started Unison file synchronisation
4444
- updated the /etc/hosts file on your laptop

docs/Install.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ We also assume common utilities are present:
1313

1414
#### Docker
1515

16-
Follow the installation instructions for your distro from https://docs.docker.com/engine/install/. It is generally straightforward, except for users of [Fedora 31 and above](https://duckduckgo.com/?q=docker+fedora+32).
16+
Follow the installation instructions for your distro from https://docs.docker.com/engine/install/. It is generally straightforward, except for users of [Fedora - more information here](https://fedoramagazine.org/docker-and-fedora-35/).
1717

1818
**_Shall I `sudo docker` or `docker`?_**
1919
Most setup instructions you will find online instruct you to [add your user to the "docker" group](https://docs.docker.com/engine/install/linux-postinstall/) to be able to call docker as a standard user.
2020
There is a [non-neglectable risk](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface) with that approach, even though it is far more convenient than being prompted for your password each and every step.
2121

22-
By default, ce-dev will assume you went the "safe" way and use `sudo docker` or `sudo docker-compose`, but you can change that in your [global configuration](userconfig).
22+
By default, ce-dev will assume you went the "safe" way and use `sudo docker` or `sudo docker compose`, but you can change that in your [global configuration](userconfig).
2323

2424
#### Docker Compose
2525

26-
Follow the installation instruction for your distro from https://docs.docker.com/compose/install/.
26+
You will need Docker Compose v2 or higher. Linux users should install the `docker-compose-plugin` package from the Docker repository, if you do not have `docker compose` already: https://docs.docker.com/compose/install/linux/#install-using-the-repository
2727

2828
#### mkcert
2929

@@ -92,6 +92,7 @@ Be sure to allow enough resources for it to run smoothly. There's no magic rule,
9292
- Be generous on RAM, but do not allocate it all for Docker. If you do not set a limit and you run a resource hungry service, everything, including processes on the hosts (think Electron apps, Chrome and the like, and by cascade the Docker processes themselves) will end up swapping and being ultra slow. 8GB or 10GB out of 16GB should be reasonable values.
9393
- Do not throttle CPU usage (ie, allocate them all). Or, go the other way round and allocate only one. This seems contradictory, but it looks like it behave diffently based on your hardware and/or OS version. In certain cases, containers seem to be unable to make use of more than one core anyway, so allocating more than one ends up being counter-productive as it will impede processes on the host.
9494
- Make sure you have enough disk space allocated for the VM Disk image. This again will vary on usage, but with a dozen of projects that have a 10GB database each, you're already well over 100GB. On the other hand, **_you can always grow the virtual disk afterward, but you can NOT shrink it without destroying all containers and volumes_**, so you can start small and grow it as needed if you encounter some "no space left on device/disk full" errors.
95+
- You might want to turn on the "Use Rosetta for x86/amd64 emulation on Apple Silicon" option in Docker under "Features in development". This speeds up the emulation significantly.
9596

9697
[![Docker Desktop setting pane](uploads/docker-mac-settings.png)](uploads/docker-mac-settings.png)
9798

docs/UserConfig.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can access a few global settings using `ce-dev config`.
44

55
## Binaries
6-
You can alter the commands called for 'docker', 'docker-compose' and 'mkcert'. This is mostly useful if you added your user to the 'docker' group on Linux and don't want to be prompted for your password. Or if you're doing funky stuff !
6+
You can alter the commands called for 'docker', 'docker compose' and 'mkcert'. This is mostly useful if you added your user to the 'docker' group on Linux and don't want to be prompted for your password. Or if you're doing funky stuff !
77

88
## SSH Username and Key
9-
Define the default username and private key to be used to be able to [SSH from containers to private resources](ssh), eg. cloning private repos or syncing environments back.
9+
Define the default username and private key to be used to be able to [SSH from containers to private resources](ssh), eg. cloning private repos or syncing environments back.

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ -n "$(which ce-dev)" ]; then
1414
fi
1515
fi
1616
echo "Checking for dependencies..."
17-
for BINARY in docker docker-compose mkcert; do
17+
for BINARY in docker mkcert; do
1818
if [ -z "$(which "$BINARY")" ]; then
1919
echo "Could not find $BINARY"
2020
echo "Ensure it is installed and in your \$PATH"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ce-dev",
33
"description": "Local Stack wrapper tool",
4-
"version": "1.1.23",
4+
"version": "1.2.0",
55
"author": " @pm98zz-c",
66
"bin": {
77
"ce-dev": "./bin/run"

src/base-cmd-abstract-docker-images.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default abstract class DockerImagesCmd extends BaseCmd {
88
help: flags.help({char: 'h'}),
99
template: flags.string({
1010
char: 't',
11-
description: 'Path to a docker-compose template file, relative to the project root. WARNING: this must match the original one the project was constructed with.',
11+
description: 'Path to a docker compose template file, relative to the project root. WARNING: this must match the original one the project was constructed with.',
1212
default: 'ce-dev.compose.prebuilt.yml',
1313
}),
1414
username: flags.string({

0 commit comments

Comments
 (0)