forked from toolshed/coop-cloud-backend
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cad24f4001 | |||
| 052e327182 | |||
| 22178dbc7d | |||
| 941ee2955c |
17
.drone.yml
Normal file
17
.drone.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: coopcloud.tech/abra-wizard
|
||||
steps:
|
||||
|
||||
- name: publish image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
auto_tag: true
|
||||
username: abra-wizard-bot
|
||||
password:
|
||||
from_secret: git_coopcloud_tech_token_abra_wizard
|
||||
repo: git.coopcloud.tech/toolshed/coop-cloud-backend
|
||||
registry: git.coopcloud.tech
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
@ -3,15 +3,12 @@ RUN mkdir /backend
|
||||
COPY --parents ["api", "cli", "internal", "go.mod", "go.sum", "app.go", "/backend/"]
|
||||
RUN go build -C /backend -o gobackend
|
||||
|
||||
FROM node
|
||||
FROM node:slim
|
||||
RUN mkdir /home/node/wizard
|
||||
COPY --from=0 /backend/gobackend /home/node/wizard/gobackend
|
||||
|
||||
USER node
|
||||
COPY ./command.sh /
|
||||
COPY ssh_config /home/node/.ssh/config
|
||||
COPY id_ed25519_* /home/node/.ssh/
|
||||
COPY dot_abra /home/node/.abra/
|
||||
RUN curl https://install.abra.coopcloud.tech | bash
|
||||
ENV ABRA_BIN=/home/node/.local/bin/abra
|
||||
# RUN $ABRA_BIN recipe fetch -a
|
||||
@ -25,4 +22,5 @@ USER node
|
||||
|
||||
EXPOSE 5173 3000
|
||||
# ENV VITE_API_URL=http://localhost:3000/api
|
||||
ENV VITE_MOCK_AUTH=false
|
||||
CMD [ "/command.sh" ]
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
# coop-cloud-backend
|
||||
A Go service that exposes RESTful API endpoints to manage Abra programmatically.
|
||||
Integrates with https://git.coopcloud.tech/BornDeleuze/coop-cloud-front.
|
||||
Integrates with https://git.coopcloud.tech/toolshed/coop-cloud-front.
|
||||
|
||||
## Starting the service with Docker
|
||||
Build the container:
|
||||
```bash
|
||||
docker build -t abra-wizard:latest
|
||||
docker build -t coop-cloud-wizard:latest
|
||||
```
|
||||
|
||||
Run the container:
|
||||
```bash
|
||||
docker run abra-wizard
|
||||
docker run -u 1000:1000 -v "$HOME/.abra:/home/node/.abra" -v "$HOME/.ssh:/home/node/.ssh" coop-cloud-wizard
|
||||
```
|
||||
|
||||
## Getting started with development
|
||||
- Clone the front end application `git clone https://git.coopcloud.tech/BornDeleuze/coop-cloud-front.git`
|
||||
- Clone the front end application `git clone https://git.coopcloud.tech/toolshed/coop-cloud-front.git`
|
||||
- Checkout the `dev-nomock` branch `cd coop-cloud-front && git checkout dev-nomock`
|
||||
- Launch the front-end application `npm run dev`
|
||||
- Start this Go app `go run .`
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package api
|
||||
|
||||
// Represents an App, follows the format of
|
||||
// https://git.coopcloud.tech/BornDeleuze/coop-cloud-front
|
||||
// https://git.coopcloud.tech/toolshed/coop-cloud-front
|
||||
type AbraApp struct {
|
||||
Server string `json:"server"`
|
||||
Recipe string `json:"recipe`
|
||||
@ -47,4 +47,4 @@ type DeployStream struct {
|
||||
retries int `json:"retries"`
|
||||
health string `json:"health"`
|
||||
rollback bool `json:"rollback"`
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package cli
|
||||
|
||||
// Represents an App, follows the format of
|
||||
// https://git.coopcloud.tech/BornDeleuze/coop-cloud-front
|
||||
// https://git.coopcloud.tech/toolshed/coop-cloud-front
|
||||
type AbraApp struct {
|
||||
Server string `json:"server"`
|
||||
Recipe string `json:"recipe`
|
||||
@ -79,4 +79,4 @@ type AbraAppService struct {
|
||||
// Website string `json:"website"`
|
||||
// }
|
||||
|
||||
// type RecipeCatalogue map[Name]RecipeMeta
|
||||
// type RecipeCatalogue map[Name]RecipeMeta
|
||||
|
||||
Reference in New Issue
Block a user