1 sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2 sudo chmod +x /usr/local/bin/docker-compose
3 docker-compose --version
Background... I'd like to secure Beancount online. This is the
authentication & authorization could be farmed out to a docker image in a docker compose network bit...
version: "3.7"
services:
fava:
image: yegle/fava
ports:
- 8080:5000
volumes:
- ./data:/data/
environment:
BEANCOUNT_FILE: /data/fava.bean
docker-compose up -d
docker-compose up -d
mpayne@localhost:~/docker-compose-talk/fava$ docker-compose up -d
Creating network "fava_default" with the default driver
Pulling fava (yegle/fava:)...
latest: Pulling from yegle/fava
6729630f5ebf: Pull complete
e2745900642c: Pull complete
c5900d68e237: Pull complete
71c3ced08a8f: Pull complete
ad7239340312: Pull complete
Digest: sha256:b9eed1e3f5da70768571cfe33a0a6ea2954bc6af976f4f5565bb15f2880d442c
Status: Downloaded newer image for yegle/fava:latest
Creating fava_fava_1 ... done
mpayne@localhost:~/docker-compose-talk/fava$ docker-compose ps
Name Command State Ports
------------------------------------------------------
fava_fava_1 fava Up 0.0.0.0:8080->5000/tcp
mpayne@localhost:~/docker-compose-talk/fava$
Note that we can add transactions and they are saved outside of docker!
python3.8 -m venv fava
source fava/bin/activate
pip3.8 install fava
fava data/fava.bean
Example: OAuth2-proxy-httpbin - Make an "application"
Example: OAuth2-proxy-httpbin: docker-compose up
Example: OAuth2-proxy-httpbin: Authorize it!
Example: OAuth2-proxy-httpbin: After authorized
Example: OAuth2-proxy-httpbin: The Magic Cookie
Example: OAuth2-proxy restricting who can login
--github-repo
-- restrict logins to collaborators of this repository formatted as orgname/repoExample: Invite Collabortor to repo
Example: github-user works but github-repo fails
So, here is what the docker-compose.yml looks like
TODO: SSL: Let's Encrypt
Maybe start with Matt R's Okta blog posts on this....
Many thanks to @WesTurner for this great twitter thread filled with wonderful tips:
Wes is one of the most helpful folks I know: