Skip to content

Commit d4b8b37

Browse files
committed
Merge branch '1.x' of github.com:codeenigma/ce-dev into 1.x
2 parents 8325116 + c884a4f commit d4b8b37

File tree

17 files changed

+37
-41
lines changed

17 files changed

+37
-41
lines changed

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: 1 addition & 1 deletion
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 😉
55

66
## Quickstart

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

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({

src/base-cmd-abstract.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export default abstract class BaseCmd extends Command {
249249
*
250250
* @param file
251251
* Path to a file to parse
252-
* @returns Parsed docker-compose declaration.
252+
* @returns Parsed docker compose declaration.
253253
*/
254254
protected loadComposeConfig(file: string): ComposeConfig {
255255
// @todo Check config is valid.

src/commands/build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ux from 'cli-ux'
77

88
const fspath = require('path')
99
export default class BuildCmd extends BaseCmd {
10-
static description = 'Commit the existing containers as new docker images, and create a new docker-compose file referencing them.'
10+
static description = 'Commit the existing containers as new docker images, and create a new docker compose file referencing them.'
1111

1212
static examples = [
1313
'$ ce-dev build --template example.compose.yml',
@@ -17,12 +17,12 @@ export default class BuildCmd extends BaseCmd {
1717
help: flags.help({char: 'h'}),
1818
template: flags.string({
1919
char: 't',
20-
description: 'Path to a docker-compose template file, relative to the project ce-dev folder. WARNING: this must match the original one the project was constructed with.',
20+
description: 'Path to a docker compose template file, relative to the project ce-dev folder. WARNING: this must match the original one the project was constructed with.',
2121
default: 'ce-dev.compose.yml',
2222
}),
2323
destination: flags.string({
2424
char: 'd',
25-
description: 'Path to the output docker-compose file, relative to the project ce-dev folder.',
25+
description: 'Path to the output docker compose file, relative to the project ce-dev folder.',
2626
default: 'ce-dev.compose.prebuilt.yml',
2727
}),
2828
registry: flags.string({

src/commands/destroy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {flags} from '@oclif/command'
55
import ux from 'cli-ux'
66

77
export default class DestroyCmd extends BaseCmd {
8-
static description = 'Destroy project\'s containers using docker-compose kill.'
8+
static description = 'Destroy project\'s containers using docker compose kill.'
99

1010
static examples = [
1111
'$ ce-dev destroy',
@@ -39,13 +39,13 @@ export default class DestroyCmd extends BaseCmd {
3939
}
4040

4141
/**
42-
* Wrapper around docker-compose.
42+
* Wrapper around docker compose.
4343
*/
4444
private down(): void {
45-
ux.action.start('Killing containers with docker-compose kill')
45+
ux.action.start('Killing containers with docker compose kill')
4646
execSync(this.dockerComposeBin + ' -p ' + this.activeProjectInfo.project_name + ' kill', {cwd: this.ceDevDir, stdio: 'inherit'})
4747
ux.action.stop()
48-
ux.action.start('Remove containers and anonymous volumes with docker-compose rm')
48+
ux.action.start('Remove containers and anonymous volumes with docker compose rm')
4949
execSync(this.dockerComposeBin + ' -p ' + this.activeProjectInfo.project_name + ' rm -v --force', {cwd: this.ceDevDir, stdio: 'inherit'})
5050
ux.action.stop()
5151
}

0 commit comments

Comments
 (0)