Upload your folder
Deploy code that isn't on GitHub by uploading a .tar.gz of your folder from your agent, a script, or your CI.
An app with uploaded code isn’t tied to any repository. You send a .tar.gz of your folder, and Olimpia builds and publishes it. Agents use this method by default. It is also the best option when you deploy from your own CI.
The flow
The examples use a personal token stored in $OLIMPIA_TOKEN.
Create the app
You create apps with uploaded code from your agent or through the API. To find your project’s id, call GET /projects.
curl -fsS -X POST -H "Authorization: Bearer $OLIMPIA_TOKEN" \
-H "content-type: application/json" \
-d '{"project_id": "<id del proyecto>", "name": "mi-api", "source": "upload", "port": 3000}' \
https://api.olimpia.dev/appsSave the id from the response in $APP_ID.
Request an upload URL
Each upload uses a signed URL that expires after 15 minutes.
curl -fsS -X POST -H "Authorization: Bearer $OLIMPIA_TOKEN" \
https://api.olimpia.dev/apps/$APP_ID/sourceThe response includes upload_url and key.
Package and upload the folder
From your project’s root, with git:
git add -A && ref=$(git stash create)
git archive --format=tar.gz --prefix=src/ -o /tmp/src.tar.gz "${ref:-HEAD}"
curl -fsS -X PUT -T /tmp/src.tar.gz "$UPLOAD_URL"This includes uncommitted changes and respects .gitignore. It doesn’t create any commits or stashes.
Deploy
curl -fsS -X POST -H "Authorization: Bearer $OLIMPIA_TOKEN" \
-H "content-type: application/json" \
-d "{\"source\": \"$KEY\", \"message\": \"primer deploy\"}" \
https://api.olimpia.dev/apps/$APP_ID/deploymentsArchive requirements
- A
.tar.gzwith all files inside a single top-level folder. This is why the example uses--prefix=src/. - Up to 300 MB.
- No
node_modules, build folders, virtual environments, or.envfiles. If you don’t use git, exclude them yourself:
tar --exclude=node_modules --exclude=.git --exclude='.env*' --exclude=dist \
--exclude=build --exclude=.next --exclude=target --exclude=.venv \
-czf /tmp/src.tar.gz --transform 's,^\.,src,' .
Rebuild
A deploy without source rebuilds the most recent upload. Use it to apply new environment variables without uploading the code again.
Monorepos
Upload the entire repository and set the app’s Root folder (for example, apps/web).
Retention
Olimpia keeps the most recent upload for each app and deletes older uploads the next day. When you delete the app, all of its uploads are deleted.