Skip to content

Commit

Permalink
tec: Use Docker Compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
marienfressinaud committed Jul 26, 2023
1 parent 4eda049 commit 770ef50
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

USER = $(shell id -u):$(shell id -g)

DOCKER_COMPOSE = docker-compose -p flusio -f docker/docker-compose.yml
DOCKER_COMPOSE = docker compose -p flusio -f docker/docker-compose.yml

ifdef NO_DOCKER
PHP = php
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/cli
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

flusio-compose () {
docker-compose -p flusio -f ./docker/docker-compose.yml "$@"
docker compose -p flusio -f ./docker/docker-compose.yml "$@"
}

if [ -z `flusio-compose ps -q php` ] || [ -z `docker ps -q --no-trunc | grep $(flusio-compose ps -q php)` ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/composer
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

flusio-compose () {
docker-compose -p flusio -f ./docker/docker-compose.yml "$@"
docker compose -p flusio -f ./docker/docker-compose.yml "$@"
}

if [ -z `flusio-compose ps -q php` ] || [ -z `docker ps -q --no-trunc | grep $(flusio-compose ps -q php)` ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/npm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

flusio-compose () {
docker-compose -p flusio -f ./docker/docker-compose.yml "$@"
docker compose -p flusio -f ./docker/docker-compose.yml "$@"
}

if [ -z `flusio-compose ps -q bundler` ] || [ -z `docker ps -q --no-trunc | grep $(flusio-compose ps -q bundler)` ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

flusio-compose () {
docker-compose -p flusio -f ./docker/docker-compose.yml "$@"
docker compose -p flusio -f ./docker/docker-compose.yml "$@"
}

if [ -z `flusio-compose ps -q php` ] || [ -z `docker ps -q --no-trunc | grep $(flusio-compose ps -q php)` ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/psql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

USER=$(id -u):$(id -g) docker-compose -p flusio -f ./docker/docker-compose.yml exec database psql -d flusio_development -U postgres "$@"
USER=$(id -u):$(id -g) docker compose -p flusio -f ./docker/docker-compose.yml exec database psql -d flusio_development -U postgres "$@"
2 changes: 1 addition & 1 deletion docs/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ I use [Parcel](https://parceljs.org/) to bundle the assets. Be aware I use the
version 2 which is still in beta version. I really like Parcel, but
unfortunately version 1 is buggy with the setup I want…

Either if you started Parcel via docker-compose or NPM, it will look at two
Either if you started Parcel via Docker Compose or NPM, it will look at two
files: [`src/assets/stylesheets/application.css`](/src/assets/stylesheets/application.css)
and [`src/assets/javascripts/application.js`](/src/assets/javascripts/application.js).
These files are the entrypoints and load the other CSS and JS files, which are
Expand Down
5 changes: 2 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ $ cd flusio

## With Docker

First, make sure to [install Docker Engine](https://docs.docker.com/engine/install/)
and [Docker Compose](https://docs.docker.com/compose/install/).
First, make sure to [install Docker Engine](https://docs.docker.com/engine/install/).

Then, install the dependencies with:

Expand All @@ -35,7 +34,7 @@ Once this is done, you should start the services:
$ make docker-start
```

This command calls `docker-compose` with the file under the `docker/` folder.
This command calls `docker compose` with the file under the `docker/` folder.
The first time you call it, it will download the Docker images and build the
`php` one with the information from the `docker/Dockerfile.php` file.

Expand Down
2 changes: 1 addition & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ $ ./docker/bin/cli
$ ./docker/bin/psql
```

They only delegate the commands to their respective containers via `docker-compose`.
They only delegate the commands to their respective containers via `docker compose`.
Just take a look at the files to understand!
2 changes: 1 addition & 1 deletion docs/technical_stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It’s using [PHPUnit 9](https://phpunit.de/) as a testing framework and
for the PHP files. JS files are linted with [ESLint](https://eslint.org/docs/rules/semi)
and CSS files with [stylelint](https://stylelint.io/).

The development environment is powered by Docker and docker-compose setting up
The development environment is powered by Docker and Docker Compose setting up
4 containers: a PHP development server, a job worker, a PostgreSQL database and
a Node container running Parcel in watch mode. See the [`docker/` folder](/docker/)
for more information.
2 changes: 1 addition & 1 deletion tests/mock_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The mock server allows to test HTTP requests without network. It is used
* with the mockHttpWith* methods from the MockHttpHelper.
*
* The mock server is started via the docker-compose file in development and in
* The mock server is started via the Docker Compose file in development and in
* the CI workflow on GitHub Actions with the following command:
*
* php -t . -S 0.0.0.0:8001 ./tests/mock_server.php
Expand Down

0 comments on commit 770ef50

Please sign in to comment.