-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and create docker-compose.yml for development purposes (and more, possibly)
- Loading branch information
Showing
7 changed files
with
96 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -x ARK_CLIENT_FILE_TYPES "cr2,heic,jpg,jpeg,mov,orf" | ||
set -x ARK_CLIENT_SERVER_ADDRESS "localhost:9999" | ||
set -x ARK_CLIENT_SERVER_PROTOCOL "http" | ||
set -x ARK_CLIENT_SIGNING_KEY "supersecret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
bin/ | ||
docker/data/ | ||
|
||
.env | ||
*.db | ||
|
||
TODO.md | ||
TODO.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM golang:1.21-alpine3.18 AS builder | ||
WORKDIR $GOPATH/src/github.com/fedragon/ark | ||
COPY . . | ||
RUN CGO_ENABLED=0 go build -o bin/server cmd/server/main.go | ||
|
||
FROM alpine:3.18 | ||
RUN adduser -D ark -u 5000 | ||
USER ark | ||
COPY --from=builder /go/src/github.com/fedragon/ark/bin/server /bin/server | ||
EXPOSE 9999 | ||
ENTRYPOINT ["/bin/server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARK_HOST_PORT="9999" | ||
ARK_ARCHIVE_PATH="./data/archive" | ||
|
||
PROMETHEUS_CONFIG_PATH="./prometheus.yml" | ||
PROMETHEUS_DATA_PATH="./data/prometheus" | ||
PROMETHEUS_HOST_PORT=9090 | ||
|
||
REDIS_HOST_PORT=6379 | ||
REDIS_DATA_PATH="./data/redis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
version: "3.9" | ||
name: ark | ||
|
||
services: | ||
prometheus: | ||
image: prom/prometheus:v2.47.0 | ||
volumes: | ||
- $PROMETHEUS_CONFIG_PATH:/etc/prometheus/prometheus.yml | ||
- $PROMETHEUS_DATA_PATH:/prometheus | ||
ports: | ||
- "$PROMETHEUS_HOST_PORT:9090" | ||
|
||
redis: | ||
image: redis:7.2.1 | ||
volumes: | ||
- $REDIS_DATA_PATH:/data | ||
entrypoint: | ||
- redis-server | ||
- --save 30 1 | ||
ports: | ||
- "$REDIS_HOST_PORT:6379" | ||
|
||
server: | ||
# image: fedragon/ark:latest | ||
build: | ||
context: .. | ||
ports: | ||
- "$ARK_HOST_PORT:9999" | ||
volumes: | ||
- ark_data:/ark | ||
environment: | ||
ARK_SERVER_ADDRESS: "0.0.0.0:9999" | ||
ARK_SERVER_ARCHIVE_PATH: /ark | ||
ARK_SERVER_REDIS_ADDRESS: "redis:6379" | ||
ARK_SERVER_REDIS_DATABASE: 0 | ||
secrets: | ||
- server | ||
entrypoint: | ||
- bin/sh | ||
- -c | ||
- 'source /run/secrets/server && /bin/server' | ||
depends_on: | ||
- prometheus | ||
- redis | ||
|
||
secrets: | ||
server: | ||
file: ./secrets/server | ||
|
||
volumes: | ||
ark_data: | ||
driver: local | ||
driver_opts: | ||
type: 'none' | ||
o: 'bind' | ||
device: '$ARK_ARCHIVE_PATH' | ||
prometheus_data: | ||
driver: local | ||
driver_opts: | ||
type: 'none' | ||
o: 'bind' | ||
device: '$PROMETHEUS_DATA_PATH' | ||
redis_data: | ||
driver: local | ||
driver_opts: | ||
type: 'none' | ||
o: 'bind' | ||
device: '$REDIS_DATA_PATH' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export ARK_SERVER_SIGNING_KEY=supersecret |