mirror of
https://codeberg.org/forgejo/docs.git
synced 2024-11-21 17:36:59 -05:00
docs: user: actions: jobs.<id>.service.<id>.ports is a noop
This commit is contained in:
parent
64e70b8eec
commit
36c42ea9f3
1 changed files with 2 additions and 6 deletions
|
@ -108,12 +108,12 @@ services:
|
||||||
env:
|
env:
|
||||||
POSTGRES_DB: test
|
POSTGRES_DB: test
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
ports:
|
|
||||||
- '5432:5432'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
A container with the specified `image:` is run before the `job` starts and is terminated when it completes. The job can address the service using its name, in this case `pgsql`.
|
A container with the specified `image:` is run before the `job` starts and is terminated when it completes. The job can address the service using its name, in this case `pgsql`.
|
||||||
|
|
||||||
|
The IP address of `pgsql` is on the same [docker network](https://docs.docker.com/engine/reference/commandline/network/) as the container running the **steps** and there is no need for port binding (see the [docker run --publish](https://docs.docker.com/engine/reference/commandline/run/) option for more information). The `postgres:15` image exposes the PostgreSQL port 5432 and a client will be able to connect as [shown in this example](https://code.forgejo.org/actions/setup-forgejo/src/branch/main/testdata/example-service/.forgejo/workflows/postgresql.yml)
|
||||||
|
|
||||||
### image
|
### image
|
||||||
|
|
||||||
The location of the container image to run.
|
The location of the container image to run.
|
||||||
|
@ -122,10 +122,6 @@ The location of the container image to run.
|
||||||
|
|
||||||
Key/value pairs injected in the environment when running the container, equivalent to [--env](https://docs.docker.com/engine/reference/commandline/run/).
|
Key/value pairs injected in the environment when running the container, equivalent to [--env](https://docs.docker.com/engine/reference/commandline/run/).
|
||||||
|
|
||||||
### ports
|
|
||||||
|
|
||||||
Port binding of the container, equivalent to [--publish](https://docs.docker.com/engine/reference/commandline/run/).
|
|
||||||
|
|
||||||
### cmd
|
### cmd
|
||||||
|
|
||||||
A list of command and arguments, equivalent to [[COMMAND] [ARG...]](https://docs.docker.com/engine/reference/commandline/run/).
|
A list of command and arguments, equivalent to [[COMMAND] [ARG...]](https://docs.docker.com/engine/reference/commandline/run/).
|
||||||
|
|
Loading…
Reference in a new issue