diff --git a/admin/cmd/adminctl/main.go b/admin/cmd/adminctl/main.go index ef52530..3b9d61b 100644 --- a/admin/cmd/adminctl/main.go +++ b/admin/cmd/adminctl/main.go @@ -16,6 +16,7 @@ import ( "time" "github.com/google/uuid" + "github.com/joho/godotenv" "github.com/mrhid6/vantage/admin/internal/config" "github.com/mrhid6/vantage/admin/internal/db" "github.com/mrhid6/vantage/admin/internal/models" @@ -23,6 +24,7 @@ import ( ) func main() { + godotenv.Load() if len(os.Args) < 2 { fmt.Fprintln(os.Stderr, "usage: adminctl staff-add") os.Exit(2) diff --git a/cloud-instance-creation-process.md b/cloud-instance-creation-process.md new file mode 100644 index 0000000..e055d15 --- /dev/null +++ b/cloud-instance-creation-process.md @@ -0,0 +1,21 @@ +# Current cloud instance process + +The current processs for creating cloud instances is incorrect. + +At the moment the process is the following: + +- Customer goes to `https://vantage.hostxtra.co.uk/start` then fills in the form. +- Customer is then sent and email to verify +- Customer clicks the link and the instance is created in the DB. +- Customer can then access the instance. + +As the `/start` process is auto creating a new instance this should default to the free tier instance. + +The issue is that this doesn't create an `account` and `admin_instance` on the admin side. + +The process should be the following: + +- Customer goes to `https://vantage.hostxtra.co.uk/start` then fills in the form (including account name). +- Customer is then sent and email to verify +- Customer clicks the link and the instance is created in the DB. +- `account` and `admin_instance` is created diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 94b938a..79b4a97 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -1,51 +1,52 @@ services: - redis: - image: redis:8 - restart: unless-stopped - volumes: - - redis_data:/data - healthcheck: - test: - - CMD - - redis-cli - - ping - interval: 10s - timeout: 5s - retries: 5 - guacd: - image: docker.io/guacamole/guacd:1.6.0 - restart: unless-stopped - ports: - - 4822:4822 - server: - image: gitea.hostxtra.co.uk/mrhid6/vantage/server:latest - restart: unless-stopped - ports: - - 8080:8080 - - 9090:9090 - environment: - MONGO_URI: ${MONGO_URI:-} - REDIS_ADDR: redis:6379 - GITEA_HOST: ${GITEA_HOST} - GRPC_HOST: ${GRPC_HOST} - GRPC_PORT: "9090" - HTTP_PORT: "8080" - KEY_ENCRYPTION_KEY: ${KEY_ENCRYPTION_KEY:-} - VANTAGE_WORKFLOW_LOG_DIR: ${VANTAGE_WORKFLOW_LOG_DIR:-} - GUACD_ADDR: guacd:4822 - depends_on: - redis: - condition: service_healthy - volumes: - - ./data:/data - web: - image: gitea.hostxtra.co.uk/mrhid6/vantage/web:latest - restart: unless-stopped - ports: - - 3000:3000 - depends_on: - - server + redis: + image: redis:8 + restart: unless-stopped + volumes: + - redis_data:/data + healthcheck: + test: + - CMD + - redis-cli + - ping + interval: 10s + timeout: 5s + retries: 5 + guacd: + image: docker.io/guacamole/guacd:1.6.0 + restart: unless-stopped + ports: + - 4822:4822 + server: + image: gitea.hostxtra.co.uk/mrhid6/vantage/server:latest + restart: unless-stopped + ports: + - 8080:8080 + - 9090:9090 + environment: + MONGO_URI: ${MONGO_URI:-} + REDIS_ADDR: redis:6379 + GITEA_HOST: ${GITEA_HOST} + GRPC_HOST: ${GRPC_HOST} + GRPC_PORT: "9090" + HTTP_PORT: "8080" + KEY_ENCRYPTION_KEY: ${KEY_ENCRYPTION_KEY:-} + VANTAGE_WORKFLOW_LOG_DIR: ${VANTAGE_WORKFLOW_LOG_DIR:-} + GUACD_ADDR: guacd:4822 + APP_ROOT_LABEL: vantage + depends_on: + redis: + condition: service_healthy + volumes: + - ./data:/data + web: + image: gitea.hostxtra.co.uk/mrhid6/vantage/web:latest + restart: unless-stopped + ports: + - 3000:3000 + depends_on: + - server volumes: - mongo_data: null - redis_data: null + mongo_data: null + redis_data: null networks: {}