Skip to content

Commit 78edd00

Browse files
committed
Docs: document the new deployment
1 parent 374ae06 commit 78edd00

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

README.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,30 +63,22 @@ $ docker push codingteam/codingteam.org.ru:latest
6363

6464
Deploy
6565
------
66-
67-
To install the application from Docker, run the following command:
68-
69-
```console
70-
$ docker run -d --restart unless-stopped -p:$PORT:80 --name $NAME codingteam/codingteam.org.ru:$VERSION
66+
Consider using the following [Ansible][ansible] task for deployment:
67+
```yaml
68+
- name: Set up the Docker container
69+
community.docker.docker_container:
70+
name: codingteam.org.ru
71+
image_name_mismatch: recreate
72+
image: codingteam/codingteam.org.ru:{{ codingteam_org_ru_version }}
73+
published_ports:
74+
- '5000:5000'
75+
restart_policy: unless-stopped
76+
default_host_ip: ''
77+
env:
78+
ASPNETCORE_URLS: "http://+:5000"
7179
```
7280
73-
Where
74-
- `$PORT` is the port you want to expose the application on
75-
- `$NAME` is the container name
76-
- `$VERSION` is the version you want to deploy, or `latest` for the latest
77-
available one
78-
79-
For example, a production server may use the following settings (note this
80-
command uses the Bash syntax; adapt for your shell if necessary):
81-
82-
```bash
83-
PORT=5000
84-
NAME=codingteam.org.ru
85-
VERSION=latest
86-
docker pull codingteam/codingteam.org.ru:$VERSION
87-
docker rm -f $NAME
88-
docker run -d --restart unless-stopped -p $PORT:80 --name $NAME codingteam/codingteam.org.ru:$VERSION
89-
```
81+
This will deploy the Docker container version `{{ codingteam_org_ru_version }}` and make it to listen port `5000` on the host.
9082

9183
Documentation
9284
-------------
@@ -95,8 +87,8 @@ Documentation
9587
- [Maintainership][docs.maintainership]
9688
- [License][license]
9789

90+
[ansible]: https://docs.ansible.com/
9891
[badge.docker]: https://img.shields.io/docker/v/codingteam/codingteam.org.ru?sort=semver
99-
10092
[changelog]: CHANGELOG.md
10193
[codingteam.org.ru]: https://codingteam.org.ru/
10294
[docker-hub]: https://hub.docker.com/r/codingteam/codingteam.org.ru

0 commit comments

Comments
 (0)