Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Feat/device auth grant #3230

Closed
wants to merge 11 commits into from
Next Next commit
update to create local dev env
  • Loading branch information
pedrule committed Jun 29, 2022
commit 05e8f76c63961d5c6929b48dfdc724fd50d202bf
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ dist
test/e2e
test/mock-*
cypress
docker-compose
Dockerfile
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PWD=/Users/macbookpro/dev/shadow
SECRETS_SYSTEM=RoRuGCWdmIBL7wYojqjUY542DLKvQOIx
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
// Pointez pour afficher la description des attributs existants.
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${fileDirname}"
}
]
}
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM docker:dind as docker
FROM golang:1.17.11-buster
# FROM --platform=linux/amd64 golang:1.17.11-buster
RUN apt-get update && apt-get install -y git gcc bash make curl docker-compose
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash && apt-get install -y nodejs
# COPY /Users/macbookpro/dev/shadow/hydra_ory /Users/macbookpro/dev/shadow/hydra
# WORKDIR /Users/macbookpro/dev/shadow/hydra
# RUN apt-get update && apt-get install -y pass gnupg2
WORKDIR /usr
RUN git clone https://github.com/go-delve/delve
WORKDIR /usr/delve
RUN go install github.com/go-delve/delve/cmd/dlv

# ENTRYPOINT [ "gpg2", "–", "gen-key", "&&", "pass", "init", '\$gpg_id' ]

60 changes: 60 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: "3.7"
services:
hydra-build-go:
container_name: hydra-build-go
depends_on:
- init-dev
image: oryd/hydra:latest-sqlite
command: serve all --dangerous-force-http
# command: serve -c /etc/config/hydra/hydra.yml all --dangerous-force-http
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
- SECRETS_SYSTEM=$SECRETS_SYSTEM
volumes:
- type: volume
source: hydra-sqlite
target: /var/lib/sqlite
# - type: bind
# source: ./config_hydra.yml
# target: /etc/config/hydra/hydra.yml
restart: unless-stopped
networks:
intranet:
oathkeeper:
# entrypoint: /bin/sh -c "while sleep 1000; do :; done;"
hydra-migrate:
image: oryd/hydra:latest-sqlite
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
command: migrate sql -e --yes
# command: migrate -c /etc/config/hydra/hydra.yml sql -e --yes
volumes:
- type: volume
source: hydra-sqlite
target: /var/lib/sqlite
read_only: false
# - type: bind
# source: ./config_hydra.yml
# target: /etc/config/hydra/hydra.yml
restart: on-failure
networks:
intranet:
init-dev:
image: go-build
container_name: go-builder
build: .
entrypoint: /bin/bash -c "while sleep 1000; do :; done;"
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
- type: bind
source: ${PWD}
target: $PWD

networks:
intranet:
oathkeeper:
external: true
volumes:
hydra-sqlite: