@@ -109,49 +109,33 @@ $ docker push codingteam/loglist:latest
109109
110110Deployment
111111----------
112-
113- To install the application from Docker, run the following command:
114-
115- ``` console
116- $ docker run -d --restart unless-stopped \
117- --name $NAME \
118- -v $CONFIG:/app/conf/application.conf \
119- --env-file $ENV_FILE \
120- --add-host db:$DB_IP \
121- -p:$PORT:9000 \
122- codingteam/loglist:$VERSION
112+ Consider using the following [ Ansible] [ ansible ] task for deployment:
113+ ``` yaml
114+ - name : Set up the application container
115+ community.docker.docker_container :
116+ name : loglist.app
117+ image_name_mismatch : recreate
118+ image : codingteam/loglist:{{ loglist_version }}
119+ published_ports :
120+ - ' 9000:9000'
121+ env :
122+ APPLY_EVOLUTIONS_SILENTLY : ' true'
123+ APPROVAL_EMAIL : ' {{ loglist_secrets.approval_email.name }}'
124+ APPROVAL_EMAIL_PASSWORD : ' {{ loglist_secrets.approval_email.password }}'
125+ APPROVAL_SMTP_HOST : ' {{ loglist_secrets.approval_email.smtp_host }}'
126+ BASIC_AUTH_PASSWORD : ' {{ loglist_secrets.basic_auth.password }}'
127+ BASIC_AUTH_USERNAME : ' {{ loglist_secrets.basic_auth.username }}'
128+ DATABASE_URL : ' jdbc:postgresql://loglist.postgresql/loglist?user=loglist&password={{ loglist_secrets.db_password }}'
129+ JAVA_OPTS : ' -Xmx200m -Xss512k -XX:+UseCompressedOops'
130+ RECAPTCHA_PRIVATE_KEY : ' {{ loglist_secrets.recaptcha.private_key }}'
131+ RECAPTCHA_PUBLIC_KEY : ' {{ loglist_secrets.recaptcha.public_key }}'
132+ HTTP_SECRET_KEY : ' {{ loglist_secrets.http_secret_key }}'
133+ volumes :
134+ - ' {{ host_config_dir }}/application.conf:/app/conf/application.conf'
135+ default_host_ip : ' '
123136` ` `
124137
125- Where
126- - ` $NAME ` is the container name
127- - ` $CONFIG ` is the ** absolute** path to the configuration file
128- - ` $ENV_FILE ` is the path to the env file (see
129- [ ` docs/loglist.env ` ] [ docs-loglist.env ] for example)
130- - ` $DB_IP ` is the IP address of the database service
131- - ` $PORT ` is external port the site will be available on
132- - ` $VERSION ` is the version you want to deploy, or ` latest ` for the latest
133- available one
134-
135- For example, a production server may use the following settings (note this
136- command uses the Bash syntax; adapt for your shell if necessary):
137-
138- ``` bash
139- NAME=loglist
140- CONFIG=/opt/loglist/conf/application.conf
141- VERSION=latest
142- PORT=9000
143- ENV_FILE=/opt/loglist/conf/loglist.env
144- DB_IP=$( docker network inspect --format=' {{range .IPAM.Config}}{{.Gateway}}{{end}}' bridge)
145- docker pull codingteam/loglist:$VERSION
146- docker rm -f $NAME
147- docker run -d --restart unless-stopped \
148- --name $NAME \
149- -v $CONFIG :/app/conf/application.conf \
150- --env-file $ENV_FILE \
151- --add-host db:$DB_IP \
152- -p:$PORT :9000 \
153- codingteam/loglist:$VERSION
154- ```
138+ See a full example in the [devops repository][devops].
155139
156140License
157141-------
@@ -162,12 +146,12 @@ details.
162146Some third-party components have their own licenses, please consult the
163147corresponding site section for further details.
164148
149+ [ansible]: https://docs.ansible.com/
165150[badge.docker]: https://img.shields.io/docker/v/codingteam/loglist?sort=semver
166-
151+ [devops]: https://github.com/codingteam/devops/blob/HEAD/xmpp2/loglist.yml
152+ [docker-hub]: https://hub.docker.com/r/codingteam/loglist
167153[docs-admin]: docs/Admin.md
168154[docs-api]: docs/API.md
169155[docs-loglist.env]: docs/loglist.env
170-
171- [ docker-hub ] : https://hub.docker.com/r/codingteam/loglist
172- [ loglist ] : https://www.loglist.xyz/
173156[loglist-original]: http://loglist.ru/
157+ [loglist]: https://www.loglist.xyz/
0 commit comments