to breel, tood
This commit is contained in:
@@ -25,6 +25,8 @@ RUN mkdir -p /var/log /main/public/files /main/public/media
|
||||
ENV GOPATH=""
|
||||
VOLUME /main/public/files
|
||||
VOLUME /main/public/media
|
||||
ENV COOKIE_SECRET
|
||||
ENV KEY
|
||||
RUN echo 'cat /main/users.yaml.gpg | gpg --batch --no-tty --passphrase="$KEY" --decrypt > /main/users.yaml && /main/exec-server "$@"' > /main/entrypoint.sh
|
||||
ENTRYPOINT ["bash", "/main/entrypoint.sh"]
|
||||
CMD []
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
1. Build a linux binary with `GOOS=linux CGO_ENABLED=0 go build -o ./exec-server -a -installsuffix cgo -ldflags "-s -w"`
|
||||
1. Add your usernames, passwords, groups to `releasedata/users.yaml`
|
||||
1. {one time} Generate and store an encryption `KEY` in Vault+Lastpass
|
||||
1. Build a Docker image with `docker build -t registry-app.eng.qops.net:5001/bel/work-notes:latest --build-arg KEY='{{INSERT YOUR KEY HERE}}' .`
|
||||
1. Push with `docker push registry-app.eng.qops.net:5001/bel/work-notes:latest`
|
||||
1. Run like `docker run -v /mnt/files:/main/public/files -v /mnt/media:/main/public/media -e KEY='{{INSERT YOUR KEY HERE}}' -p 3005:3005 --rm -it registry-app.eng.qops.net:5001/bel/work-notes:latest -auth ./users.yaml -p 3005`
|
||||
1. Build a Docker image with `docker build -t registry-app.eng.qops.net:5001/breel/work-notes:latest --build-arg KEY='{{INSERT YOUR KEY HERE}}' .`
|
||||
1. Push with `docker push registry-app.eng.qops.net:5001/breel/work-notes:latest`
|
||||
1. Run like `docker run -v /mnt/files:/main/public/files -v /mnt/media:/main/public/media -e KEY='{{INSERT YOUR KEY HERE}}' -p 3005:3005 --rm -it registry-app.eng.qops.net:5001/breel/work-notes:latest -auth ./users.yaml -p 3005`
|
||||
|
||||
### `users.yaml` Format
|
||||
|
||||
```yaml
|
||||
users:
|
||||
bel:
|
||||
password: bel
|
||||
breel:
|
||||
password: breel
|
||||
groups:
|
||||
- g1
|
||||
- g2
|
||||
|
||||
4
server/testdata/users.yaml
vendored
4
server/testdata/users.yaml
vendored
@@ -1,6 +1,6 @@
|
||||
users:
|
||||
bel:
|
||||
password: bel
|
||||
breel:
|
||||
password: breel
|
||||
groups:
|
||||
- g1
|
||||
- g2
|
||||
|
||||
Reference in New Issue
Block a user