mirror of
https://github.com/pikami/cosmium.git
synced 2025-03-09 03:17:40 +00:00
Added docker image with explorer included
This commit is contained in:
parent
96d3a0a7ae
commit
a1793c17ab
@ -66,6 +66,41 @@ dockers:
|
|||||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||||
|
- id: docker-explorer-linux-amd64
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
image_templates:
|
||||||
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-explorer-amd64"
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
use: buildx
|
||||||
|
build_flag_templates:
|
||||||
|
- "--platform=linux/amd64"
|
||||||
|
- "--pull"
|
||||||
|
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||||
|
- "--label=org.opencontainers.image.description=Lightweight Cosmos DB emulator"
|
||||||
|
- "--label=org.opencontainers.image.url=https://github.com/pikami/cosmium"
|
||||||
|
- "--label=org.opencontainers.image.source=https://github.com/pikami/cosmium"
|
||||||
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||||
|
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||||
|
- id: docker-explorer-linux-arm64
|
||||||
|
goos: linux
|
||||||
|
goarch: arm64
|
||||||
|
image_templates:
|
||||||
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-explorer-arm64"
|
||||||
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-explorer-arm64v8"
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
use: buildx
|
||||||
|
build_flag_templates:
|
||||||
|
- "--platform=linux/arm64"
|
||||||
|
- "--pull"
|
||||||
|
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||||
|
- "--label=org.opencontainers.image.description=Lightweight Cosmos DB emulator"
|
||||||
|
- "--label=org.opencontainers.image.url=https://github.com/pikami/cosmium"
|
||||||
|
- "--label=org.opencontainers.image.source=https://github.com/pikami/cosmium"
|
||||||
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||||
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||||
|
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||||
|
|
||||||
docker_manifests:
|
docker_manifests:
|
||||||
- name_template: 'ghcr.io/pikami/{{ .ProjectName }}:latest'
|
- name_template: 'ghcr.io/pikami/{{ .ProjectName }}:latest'
|
||||||
@ -78,6 +113,11 @@ docker_manifests:
|
|||||||
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-amd64"
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-amd64"
|
||||||
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-arm64"
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-arm64"
|
||||||
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-arm64v8"
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-arm64v8"
|
||||||
|
- name_template: 'ghcr.io/pikami/{{ .ProjectName }}:explorer'
|
||||||
|
image_templates:
|
||||||
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-explorer-amd64"
|
||||||
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-explorer-arm64"
|
||||||
|
- "ghcr.io/pikami/{{ .ProjectName }}:{{ .Version }}-explorer-arm64v8"
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM scratch
|
FROM alpine:latest
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY cosmium /app/cosmium
|
COPY cosmium /app/cosmium
|
||||||
|
9
Explorer.Dockerfile
Normal file
9
Explorer.Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM ghcr.io/cosmiumdev/cosmos-explorer-base:latest AS explorer-base
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
COPY --from=explorer-base /cosmos-explorer /cosmos-explorer
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY cosmium /app/cosmium
|
||||||
|
|
||||||
|
ENTRYPOINT ["/app/cosmium", "-ExplorerDir", "/cosmos-explorer"]
|
@ -50,10 +50,17 @@ AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJI
|
|||||||
|
|
||||||
If you want to run Cosmos DB Explorer alongside Cosmium, you'll need to build it yourself and point the `-ExplorerDir` argument to the dist directory. Please refer to the [Cosmos DB Explorer repository](https://github.com/Azure/cosmos-explorer) for instructions on building the application.
|
If you want to run Cosmos DB Explorer alongside Cosmium, you'll need to build it yourself and point the `-ExplorerDir` argument to the dist directory. Please refer to the [Cosmos DB Explorer repository](https://github.com/Azure/cosmos-explorer) for instructions on building the application.
|
||||||
|
|
||||||
|
There's also a prebuilt docker image that includes the explorer: `ghcr.io/pikami/cosmium:explorer`
|
||||||
|
|
||||||
Once running, the explorer can be reached by navigating following URL: `https://127.0.0.1:8081/_explorer/` (might be different depending on your configuration).
|
Once running, the explorer can be reached by navigating following URL: `https://127.0.0.1:8081/_explorer/` (might be different depending on your configuration).
|
||||||
|
|
||||||
### Running with docker (optional)
|
### Running with docker (optional)
|
||||||
|
|
||||||
|
There are two docker tags available:
|
||||||
|
|
||||||
|
- ghcr.io/pikami/cosmium:latest - Cosmium core service
|
||||||
|
- ghcr.io/pikami/cosmium:explorer - Cosmium with database explorer available on `https://127.0.0.1:8081/_explorer/`
|
||||||
|
|
||||||
If you wan to run the application using docker, configure it using environment variables see example:
|
If you wan to run the application using docker, configure it using environment variables see example:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -61,7 +68,7 @@ docker run --rm \
|
|||||||
-e COSMIUM_PERSIST=/save.json \
|
-e COSMIUM_PERSIST=/save.json \
|
||||||
-v ./save.json:/save.json \
|
-v ./save.json:/save.json \
|
||||||
-p 8081:8081 \
|
-p 8081:8081 \
|
||||||
ghcr.io/pikami/cosmium
|
ghcr.io/pikami/cosmium # or `ghcr.io/pikami/cosmium:explorer`
|
||||||
```
|
```
|
||||||
|
|
||||||
### SSL Certificate
|
### SSL Certificate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user