Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 7e7c949

Browse files
custom action to generate tag list
1 parent f904bc2 commit 7e7c949

File tree

6 files changed

+104
-1
lines changed

6 files changed

+104
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM alpine:3.10
2+
3+
RUN apk add --update python py-pip jq && \
4+
pip install yq
5+
6+
ADD entrypoint.sh ./
7+
8+
ENTRYPOINT ["/entrypoint.sh"]

.github/actions/docker-tag-list/LICENSE

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
tags="$(yq -r '.jobs["continuous-integration"].strategy.matrix.env[] | .["library-version"] + "-" + .["container-runtime"] + "|" + .["os-version"]' ${GITHUB_WORKSPACE}/.github/workflows/ci.yml)"
6+
7+
tee -a ${GITHUB_WORKSPACE}/README.dockerhub.md <<EOF
8+
9+
# Docker Images
10+
Tags | OS Version
11+
---|---
12+
${tags}
13+
EOF

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
- master
88

99
jobs:
10+
docker-hub-docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Generate Docker Hub Documentation
14+
uses: ./.github/actions/docker-tag-list
1015
continuous-integration:
1116
strategy:
1217
fail-fast: false
@@ -16,18 +21,22 @@ jobs:
1621
container-runtime-version: 2.2.5
1722
container-runtime: alpine3.9
1823
runtime: alpine-x64
24+
os-version: Alpine 3.9
1925
- library-version: 1.2.0-beta.5
2026
container-runtime-version: 2.2.5
2127
container-runtime: alpine3.8
2228
runtime: alpine-x64
29+
os-version: Alpine 3.8
2330
- library-version: 1.2.0-beta.5
2431
container-runtime-version: 2.2.5
2532
container-runtime: stretch-slim
2633
runtime: debian.9-x64
34+
os-version: Debian 9
2735
- library-version: 1.2.0-beta.5
2836
container-runtime-version: 2.2.5
2937
container-runtime: bionic
3038
runtime: ubuntu.18.04-x64
39+
os-version: Ubuntu 18.04
3140
runs-on: ubuntu-latest
3241
name: continuous-integration/github/${{ matrix.env.container-runtime }}
3342
steps:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,4 @@ paket-files/
252252
*.sln.iml
253253

254254
# Generated Schema Documentation
255-
**/Schema/*.schema.md
255+
**/Schema/*.schema.md

README.dockerhub.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# SQL Stream Store Docker Container
2+
3+
This container includes both the SQLStreamStore.Server and the user interface. The server runs on port 80 inside the container.
4+
5+
As of this time, no `latest` tag is used. The following convention is used instead: `${version}-{runtime}` e.g., `1.2.0-alpine3.9`.
6+
7+
## Getting Started
8+
9+
```bash
10+
docker pull
11+
```
12+
13+
### Environment Variables
14+
15+
Name|Description|Valid Values|Default
16+
---|---|---|---
17+
SQLSTREAMSTORE_PROVIDER|The provider.|`inmemory`, `mssql`, `postgres`, `mysql`|`inmemory`
18+
SQLSTREAMSTORE_CONNECTION_STRING|The connection string. Not valid when provider=`inmemory`|
19+
SQLSTREAMSTORE_SCHEMA|The database schema. Not valid when provider=`inmemory, mysql`|
20+
SQLSTREAMSTORE_LOG_LEVEL|The log level.|`FATAL`, `ERROR`, `WARNING`, `INFORMATION`, `VERBOSE`|`INFORMATION`
21+
SQLSTREAMSTORE_DISABLE_DELETION_TRACKING|Records deleted streams and messages in a `$deleted` stream.|`true`,`false`|`false`
22+
SQLSTREAMSTORE_USE_CANONICAL_URIS|Maximize cache hits by sorting query string parameters. Do not use in environments where the query string is sorted by the host e.g. AWS API Gateway.|`true`, `false`|`false`
23+
24+
### Commands
25+
26+
Some helper commands are provided to help you initialize the database.
27+
28+
Name|Description
29+
---|---
30+
`init-database`|Creates a database (e.g., `CREATE DATABASE`) if you don't have one.
31+
`init`|Initializes the SQL Stream Store Schema. This includes any tables, indices, and stored procedures SQL Stream Store requires.
32+
33+
### Examples
34+
35+
#### Quickstart
36+
This runs in memory, so nothing is persisted.
37+
```bash
38+
docker run --rm -p 5000:80 sqlstreamstore/server:1.2.0-alpine3.9
39+
```
40+
41+
#### Postgres w/ Verbose Logging
42+
43+
```bash
44+
# Start a postgres container
45+
docker run -p 5432:5432 --rm --detach --name sss-postgres postgres:9.6
46+
47+
# Get its ip address to supply to the connection string
48+
docker inspect --format '{{ .NetworkSettings.IPAddress }}' sss-postgres # 172.17.0.3
49+
50+
# Create the database
51+
docker run --rm \
52+
-e "SQLSTREAMSTORE_PROVIDER=postgres" \
53+
-e "SQLSTREAMSTORE_CONNECTION_STRING=host=172.17.0.3;User Id=postgres;database=mydatabase" \
54+
-e "SQLSTREAMSTORE_LOG_LEVEL=verbose" -e "SQLSTREAMSTORE_SCHEMA=public" \
55+
-p 5000:80 \
56+
sqlstreamstore/server:1.2.0-alpine3.9 init-database
57+
58+
# Create all tables, indices, and functions
59+
docker run --rm \
60+
-e "SQLSTREAMSTORE_PROVIDER=postgres" \
61+
-e "SQLSTREAMSTORE_CONNECTION_STRING=host=172.17.0.3;User Id=postgres;database=mydatabase" \
62+
-e "SQLSTREAMSTORE_LOG_LEVEL=verbose" -e "SQLSTREAMSTORE_SCHEMA=public" \
63+
-p 5000:80 \
64+
sqlstreamstore/server:1.2.0-alpine3.9 init
65+
66+
# Run the server
67+
docker run --rm \
68+
-e "SQLSTREAMSTORE_PROVIDER=postgres" \
69+
-e "SQLSTREAMSTORE_CONNECTION_STRING=host=172.17.0.3;User Id=postgres;database=mydatabase" \
70+
-e "SQLSTREAMSTORE_LOG_LEVEL=verbose" -e "SQLSTREAMSTORE_SCHEMA=public" \
71+
-p 5000:80 \
72+
sqlstreamstore/server:1.2.0-alpine3.9
73+
```

0 commit comments

Comments
 (0)