diff --git a/sparkwallet/app.json b/sparkwallet/app.json new file mode 100644 index 0000000..939564b --- /dev/null +++ b/sparkwallet/app.json @@ -0,0 +1,8 @@ +{ + "label": "sparkwallet", + "name": "Spark wallet", + "url": "some url", + "email": "skp@skp.rocks", + "latest": "0.2.2", + "defaultMountPoint": "sparkwallet" +} diff --git a/sparkwallet/docker-compose.yaml b/sparkwallet/docker-compose.yaml deleted file mode 100644 index ac06c26..0000000 --- a/sparkwallet/docker-compose.yaml +++ /dev/null @@ -1,27 +0,0 @@ -version: "3" - -services: - cyphernode_sparkwallet: - command: --no-tls - image: cyphernode/sparkwallet:v0.2.8 - volumes: - - "$LIGHTNING_DATAPATH/:/etc/lightning" - - "$APP_SCRIPT_PATH/cookie:/data/spark/cookie" - - "$GATEKEEPER_DATAPATH/htpasswd:/htpasswd/htpasswd" - labels: - - "traefik.docker.network=cyphernodeappsnet" - - "traefik.frontend.redirect.regex=^(.*)/sparkwallet$$" - - "traefik.frontend.redirect.replacement=$$1/sparkwallet/" - - "traefik.frontend.rule=PathPrefix:/sparkwallet;ReplacePathRegex: ^/sparkwallet/(.*) /$$1" - - "traefik.frontend.passHostHeader=true" - - "traefik.frontend.auth.basic.usersFile=/htpasswd/htpasswd" - - "traefik.frontend.headers.customRequestHeaders=X-Access:FoeDdQw5yl7pPfqdlGy3OEk/txGqyJjSbVtffhzs7kc=" - - "traefik.enable=true" - - "traefik.port=9737" - networks: - - cyphernodeappsnet - restart: always -networks: - cyphernodeappsnet: - external: true - diff --git a/sparkwallet/isCoreApp b/sparkwallet/isCoreApp deleted file mode 100644 index e69de29..0000000 diff --git a/sparkwallet/versions/0.2.2/candidate.json b/sparkwallet/versions/0.2.2/candidate.json new file mode 100644 index 0000000..9ddc4fe --- /dev/null +++ b/sparkwallet/versions/0.2.2/candidate.json @@ -0,0 +1,60 @@ +{ + "version": "0.2.2", + "dependencies": [ + { + "label": "api", + "version": "v0" + }, + { + "label": "bitcoin", + "version": "~0.18.0" + }, + { + "label": "lightning", + "version": "~0.7.0" + } + ], + "files": [ + "cookie", + "docker-compose.yaml", + "test.sh" + ], + "isExposed":true, + "port": 9737, + "authorization": { + "roles": [ + { + "name": "user", + "description": "regular user", + "autoAssign": true + }, + { + "name": "admin", + "description": "admin", + "autoAssign": false + } + ], + "acp": [ + { + "id": "policies:policy:by:role:user", + "description": "Allow gets for every resource", + "subjects": ["user"], + "effect": "allow", + "resources": [ + "/*" + ], + "actions": ["get"] + }, + { + "id": "policies:policy:by:role:admin", + "description": "Allow admin access to every resource.", + "subjects": ["admin"], + "effect": "allow", + "resources": [ + "/*" + ], + "actions": ["get", "post", "put", "delete"] + } + ] + } +} diff --git a/sparkwallet/cookie b/sparkwallet/versions/0.2.2/cookie similarity index 100% rename from sparkwallet/cookie rename to sparkwallet/versions/0.2.2/cookie diff --git a/sparkwallet/versions/0.2.2/docker-compose.yaml b/sparkwallet/versions/0.2.2/docker-compose.yaml new file mode 100644 index 0000000..fa985e0 --- /dev/null +++ b/sparkwallet/versions/0.2.2/docker-compose.yaml @@ -0,0 +1,41 @@ +version: "3" + +# <%= APP_UPSTREAM_HOST %>: Hostname for the upstream into cyphernodes reverse proxy to expose the app to the world +# <%= APP_ID %> use this to avoid conflicts in hostname in case you have multiple services in your app +# if you need those values inside your app, you can pass them in the environment +# container names will be ignored +# Prefix all container names you use with the <%= APP_ID %> to prevent unwanted namespace collision +# between apps. It's very likely if you use a database like redis or mongo that you will name this +# container 'mongo' or 'redis' like every other app developer, so there will be container name +# collisions. Consider using '<%= APP_ID %>_redis' or '<%= APP_ID %>_mongo' instead. +# container names will be checked and if they don't contain the unique part, the app won't be +# able to be installed + +services: + # This is the container which will be used as the reverse proxy upstream + <%= APP_UPSTREAM_HOST %>: + command: --no-tls + image: cyphernode/sparkwallet:v0.2.8 + volumes: + - "$UNSAFE__CLIGHTNING_PATH:/etc/lightning" + - "$APP_DATA/cookie:/data/spark/cookie" + labels: + - "traefik.docker.network=cyphernodeappsnet" + - "traefik.frontend.redirect.regex=^(.*)/sparkwallet$$" + - "traefik.frontend.redirect.replacement=$$1/sparkwallet/" + - "traefik.frontend.rule=PathPrefix:/sparkwallet;ReplacePathRegex: ^/sparkwallet/(.*) /$$1" + - "traefik.frontend.passHostHeader=true" + - "traefik.frontend.auth.basic.usersFile=/htpasswd/htpasswd" + - "traefik.frontend.headers.customRequestHeaders=X-Access:FoeDdQw5yl7pPfqdlGy3OEk/txGqyJjSbVtffhzs7kc=" + - "traefik.enable=true" + - "traefik.port=9737" + environment: + - "APP_UPSTREAM_HOST=<%= APP_UPSTREAM_HOST %>" + - "APP_ID=<%= APP_ID %>" + networks: + - cyphernodeappsnet + restart: always +networks: + cyphernodeappsnet: + external: true + diff --git a/sparkwallet/test.sh b/sparkwallet/versions/0.2.2/test.sh similarity index 100% rename from sparkwallet/test.sh rename to sparkwallet/versions/0.2.2/test.sh diff --git a/welcome/app.json b/welcome/app.json new file mode 100644 index 0000000..57ccfe8 --- /dev/null +++ b/welcome/app.json @@ -0,0 +1,8 @@ +{ + "label": "welcome", + "name": "The Welcome App", + "url": "some url", + "email": "skp@skp.rocks", + "latest": "0.2.2", + "defaultMountPoint": "welcome" +} diff --git a/welcome/docker-compose.yaml b/welcome/docker-compose.yaml deleted file mode 100644 index 07ab41c..0000000 --- a/welcome/docker-compose.yaml +++ /dev/null @@ -1,26 +0,0 @@ -version: "3" - -services: - cyphernode_welcome: - environment: - - "TRACING=1" - - "CYPHERNODE_URL=https://gatekeeper:${GATEKEEPER_PORT}" - image: cyphernode/app_welcome:v0.2.2 - volumes: - - "$GATEKEEPER_DATAPATH/certs/cert.pem:/data/cert.pem" - - "$GATEKEEPER_DATAPATH/keys.properties:/data/keys.properties" - - "$APP_SCRIPT_PATH/config.toml:/data/config.toml" - - "$GATEKEEPER_DATAPATH/htpasswd:/htpasswd/htpasswd" - networks: - - cyphernodeappsnet - restart: always - labels: - - "traefik.docker.network=cyphernodeappsnet" - - "traefik.frontend.rule=PathPrefixStrip:/welcome" - - "traefik.frontend.passHostHeader=true" - - "traefik.enable=true" - - "traefik.port=8080" - - "traefik.frontend.auth.basic.usersFile=/htpasswd/htpasswd" -networks: - cyphernodeappsnet: - external: true diff --git a/welcome/isCoreApp b/welcome/isCoreApp deleted file mode 100644 index e69de29..0000000 diff --git a/welcome/versions/0.2.2/candidate.json b/welcome/versions/0.2.2/candidate.json new file mode 100644 index 0000000..57fab46 --- /dev/null +++ b/welcome/versions/0.2.2/candidate.json @@ -0,0 +1,50 @@ +{ + "version": "0.2.2", + "dependencies": [], + "files": [ + "config.toml", + "docker-compose.yaml", + "test.sh" + ], + "isExposed":true, + "port": 8080, + "authorization": { + "roles": [ + { + "name": "user", + "description": "regular user", + "autoAssign": true + }, + { + "name": "admin", + "description": "admin", + "autoAssign": false + } + ], + "acp": [ + { + "id": "policies:policy:by:role:user", + "description": "Allow gets for every resource", + "subjects": ["user"], + "effect": "allow", + "resources": [ + "/*" + ], + "actions": ["get"] + }, + { + "id": "policies:policy:by:role:admin", + "description": "Allow admin access to every resource.", + "subjects": ["admin"], + "effect": "allow", + "resources": [ + "/*" + ], + "actions": ["get", "post", "put", "delete"] + } + ] + } +} + + + diff --git a/welcome/config.toml b/welcome/versions/0.2.2/config.toml similarity index 100% rename from welcome/config.toml rename to welcome/versions/0.2.2/config.toml diff --git a/welcome/versions/0.2.2/docker-compose.yaml b/welcome/versions/0.2.2/docker-compose.yaml new file mode 100644 index 0000000..bec96fd --- /dev/null +++ b/welcome/versions/0.2.2/docker-compose.yaml @@ -0,0 +1,40 @@ +version: "3" + +# <%= APP_UPSTREAM_HOST %>: Hostname for the upstream into cyphernodes reverse proxy to expose the app to the world +# <%= APP_ID %> use this to avoid conflicts in hostname in case you have multiple services in your app +# if you need those values inside your app, you can pass them in the environment +# container names will be ignored +# Prefix all container names you use with the <%= APP_ID %> to prevent unwanted namespace collision +# between apps. It's very likely if you use a database like redis or mongo that you will name this +# container 'mongo' or 'redis' like every other app developer, so there will be container name +# collisions. Consider using '<%= APP_ID %>_redis' or '<%= APP_ID %>_mongo' instead. +# container names will be checked and if they don't contain the unique part, the app won't be +# able to be installed + +services: + # This is the container which will be used as the reverse proxy upstream + <%= APP_UPSTREAM_HOST %>: + environment: + - "CYPHERNODE_URL=$GATEKEEPER_URL" + - "CYPHERNODE_CERT=/certs/cert.pem" + - "APP_DESCRIPTION_FILE=/data/app.json" + - "CONFIG_FILE=/data/config.toml" + - "APP_UPSTREAM_HOST=<%= APP_UPSTREAM_HOST %>" + - "APP_ID=<%= APP_ID %>" + image: cyphernode/app_welcome:v0.2.2 + volumes: + - "$GATEKEEPER_CERTS_PATH:/certs" + - "$APP_DATA:/data" + networks: + - cyphernodeappsnet + restart: always + labels: + - "traefik.docker.network=cyphernodeappsnet" + - "traefik.frontend.rule=PathPrefixStrip:/welcome" + - "traefik.frontend.passHostHeader=true" + - "traefik.enable=true" + - "traefik.port=8080" + - "traefik.frontend.auth.basic.usersFile=/htpasswd/htpasswd" +networks: + cyphernodeappsnet: + external: true diff --git a/welcome/test.sh b/welcome/versions/0.2.2/test.sh similarity index 100% rename from welcome/test.sh rename to welcome/versions/0.2.2/test.sh