Skip to content

Commit 29ae99c

Browse files
committed
Document and automate Docker publishing
1 parent fc48b7a commit 29ae99c

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Docker
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
push:
9+
runs-on: 'ubuntu-20.04'
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Build and Push Docker Images
14+
uses: docker/build-push-action@v1
15+
with:
16+
dockerfile: ./loglist.dockerfile
17+
username: ${{ secrets.DOCKER_USERNAME }}
18+
password: ${{ secrets.DOCKER_PASSWORD }}
19+
repository: codingteam/loglist
20+
tag_with_ref: true
21+
tags: latest

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LogList
1+
LogList [![Docker Image][badge.docker]][docker-hub]
22
=======
33

44
[Reincarnation][loglist] of [the famous service][loglist-original].
@@ -88,6 +88,26 @@ Then, set up the environment variables and run the test suite:
8888
$ sbt test
8989
```
9090

91+
Publishing
92+
----------
93+
94+
This application uses Docker for deployment. To create a Docker image, use the
95+
following command:
96+
97+
```console
98+
$ docker build -t codingteam/loglist:$LOGLIST_VERSION -t codingteam/loglist:latest -f loglist.dockerfile .
99+
```
100+
101+
(where `$LOGLIST_VERSION` is the version for the image to publish)
102+
103+
Then push the image to the Docker Hub:
104+
105+
```console
106+
$ docker login # if necessary
107+
$ docker push codingteam/loglist:$LOGLIST_VERSION
108+
$ docker push codingteam/loglist:latest
109+
```
110+
91111
License
92112
-------
93113

@@ -97,9 +117,12 @@ details.
97117
Some third-party components have their own licenses, please consult the
98118
corresponding site section for further details.
99119

120+
[badge.docker]: https://img.shields.io/docker/v/codingteam/loglist?sort=semver
121+
100122
[docs-admin]: docs/Admin.md
101123
[docs-api]: docs/API.md
102124
[docs-deployment]: docs/Deployment.md
103125

126+
[docker-hub]: https://hub.docker.com/r/codingteam/loglist
104127
[loglist]: https://www.loglist.xyz/
105128
[loglist-original]: http://loglist.ru/

0 commit comments

Comments
 (0)