Skip to content

Commit

Permalink
Replace all usages of docker-compose with native docker compose farmO…
Browse files Browse the repository at this point in the history
  • Loading branch information
mstenta committed Mar 30, 2023
2 parents f68887c + fb89eba commit 92281a3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deliver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ jobs:
DB_URL: ${{ matrix.DB_URL }}
run: |
cp docker/docker-compose.testing.* .
docker-compose -f docker-compose.testing.common.yml -f docker-compose.testing.${{ matrix.dbms }}.yml config > docker-compose.yml
docker compose -f docker-compose.testing.common.yml -f docker-compose.testing.${{ matrix.dbms }}.yml config > docker-compose.yml
- name: Start containers
run: docker-compose up -d
run: docker compose up -d
- name: Wait until www container is ready
# The www-container-fs-ready file is only created once we expect the containers to be online
# so waiting for that lets us know it is safe to start the tests
run: until [ -f ./www/www-container-fs-ready ]; do sleep 0.1; done
- name: Run PHPUnit tests
run: docker-compose exec -u www-data -T www paratest -vv --processes=${{ matrix.processes }} /opt/drupal/web/profiles/farm
run: docker compose exec -u www-data -T www paratest -vv --processes=${{ matrix.processes }} /opt/drupal/web/profiles/farm
- name: Test Drush site install with all modules
run: docker-compose exec -u www-data -T www drush site-install --db-url=${{ matrix.DB_URL }} farm farm.modules='all'
run: docker compose exec -u www-data -T www drush site-install --db-url=${{ matrix.DB_URL }} farm farm.modules='all'
release:
name: Create GitHub release
if: github.event_name == 'push' && github.ref_type == 'tag'
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [Do not add birth log mother to animal assets that already have parents #655](https://github.com/farmOS/farmOS/pull/655)
- [Simplify all map resize logic to use ResizeObserver #662](https://github.com/farmOS/farmOS/pull/662)
- [Replace all usages of docker-compose with native docker compose #627](https://github.com/farmOS/farmOS/pull/627)

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Docker containers.

To run a farmOS development environment, copy `docker-compose.development.yml`
into a new directory on your server, rename it to `docker-compose.yml` and run
`docker-compose up`.
`docker compose up`.

This example mounts a local `www` directory on the host as a volume in the
container at `/opt/drupal`, which allows for local development with an IDE.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/environment/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ Also remove port 80 from the `www` service:

Finally, start the Docker services:

`docker-compose up`
`docker compose up`

farmOS is now accessible via `https://localhost`.
2 changes: 1 addition & 1 deletion docs/development/environment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ containers for farmOS and PostgreSQL:

mkdir farmOS && cd farmOS
curl https://raw.githubusercontent.com/farmOS/farmOS/2.x/docker/docker-compose.development.yml -o docker-compose.yml
docker-compose up -d
docker compose up -d

## 2. Install farmOS

Expand Down
6 changes: 3 additions & 3 deletions docs/development/environment/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ In a docker-compose.yml based off [docker-compose.development.yml], this might l
XDEBUG_MODE: 'off'
```

The tests could then be run via `docker-compose exec` as follows:
The tests could then be run via `docker compose exec` as follows:

```sh
docker-compose exec -u www-data -T www phpunit --verbose --debug /opt/drupal/web/profiles/farm
docker compose exec -u www-data -T www phpunit --verbose --debug /opt/drupal/web/profiles/farm
```

Alternatively, the `XDEBUG_MODE` environment variable can be specified directly:

```sh
docker-compose exec -u www-data -T --env XDEBUG_MODE=off www phpunit --verbose --debug /opt/drupal/web/profiles/farm
docker compose exec -u www-data -T --env XDEBUG_MODE=off www phpunit --verbose --debug /opt/drupal/web/profiles/farm
```

[run-tests.yml]: https://raw.githubusercontent.com/farmOS/farmOS/2.x/.github/workflows/run-tests.yml
Expand Down
6 changes: 3 additions & 3 deletions docs/development/environment/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ mv www/web/profiles ./profiles
mv www/web/sites ./sites
# Update codebase.
docker-compose down
docker compose down
rm -r www
docker-compose up -d
docker compose up -d
# Restore directories.
sudo rm -rf www/web/profiles www/web/sites
Expand All @@ -46,5 +46,5 @@ cd www/web/profiles/farm
git checkout 2.x && git pull origin 2.x
# Run Drupal database updates.
docker-compose exec -u www-data www drush updb
docker compose exec -u www-data www drush updb
```
2 changes: 1 addition & 1 deletion docs/hosting/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ the farmOS repository's `docker` directory, with an accompanying `README.md`.
Copy this to a file named `docker-compose.yml` in the directory you would like
to install farmOS, update the `farmos/farmos:x.y.z` version reference, and run:

docker-compose up -d
docker compose up -d

#### Persistence

Expand Down
2 changes: 1 addition & 1 deletion docs/hosting/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The Drush command for running updates is:
If you are running farmOS in Docker with the standard Docker Compose
configuration, you can run this command inside the container with:

docker-compose exec www drush updb
docker compose exec www drush updb

## Security releases

Expand Down

0 comments on commit 92281a3

Please sign in to comment.