72 lines
1.4 KiB
Markdown
72 lines
1.4 KiB
Markdown
---
|
|
weight: 4
|
|
---
|
|
|
|
# Setting up CPKG
|
|
|
|
## With Docker
|
|
|
|
|
|
docker-compose.yml:
|
|
```yaml
|
|
services:
|
|
pkg:
|
|
image: git.tesses.org/tesses50/cpkg:latest
|
|
ports:
|
|
- "4206:4206"
|
|
volumes:
|
|
- data:/data
|
|
|
|
volumes:
|
|
data:
|
|
```
|
|
|
|
```bash
|
|
docker compose up -d
|
|
```
|
|
|
|
|
|
## Without Docker
|
|
- [CrossLang](downloads)
|
|
- [CPKG, use CPKG.crvm in releases](https://git.tesses.org/tesses50/crosslangextras/releases)
|
|
|
|
```bash
|
|
crosslang vm CPKG.crvm /path/to/where/cpkg/will/lie
|
|
```
|
|
|
|
## Setup for the first time
|
|
|
|
Launch your browser and go to [CPKG](http://127.0.0.1:4206/) (this link works if running locally on your machine)
|
|
|
|
- Click [Login](http://127.0.0.1:4206/login)
|
|
- Click Sign Up
|
|
- Fill out the form with your info
|
|
- Click Sign Up
|
|
- Click [Login](http://127.0.0.1:4206/login) again and login this time
|
|
|
|
## Uploading packages
|
|
There are a few ways of doing this
|
|
|
|
- [Upload](http://127.0.0.1:4206/upload) link on CPKG
|
|
- Signing in via [CLI](./cli/#pushing-code-to-cpkg)
|
|
- [API Key](#uploading-packages-via-api-key)
|
|
|
|
## Uploading packages via API key
|
|
This is useful in CI/CD pipelines
|
|
|
|
- Click your Display Name
|
|
- Click `Sessions`
|
|
- Click `Create API Key`
|
|
- Type in a name for the key
|
|
- Click `Create`
|
|
- Copy the API key
|
|
|
|
|
|
```bash
|
|
crosslang upload-package --host=https://YourCPKGHost/ --token=YourAPIKey # you can optionally place a crvm file afterwards if you aren't in the folder of project
|
|
```
|
|
|
|
## Adding custom CPKG for CrossLang
|
|
```bash
|
|
crosslang cpkg add https://YourCPKGHost/
|
|
``` |