Creator - EyevinnOSC/community GitHub Wiki
Creator
As a creator you can either submit your own public repository and make it available as an open web service or you can claim ownership of one that we have already made available.
Provide your code as open web service
If you want to start earning some money from your open source project you submit the link to the public GitHub repository. Once submitted the repository is reviewed and once accepted it will be available as an open web service for you and others to use. The revenue earned from the users using this service is shared with you as a creator. There are some things you can prepare to facilitate and speed up this process.
Step 1: Containerize your service or application
Create a Dockerfile in your repository that builds a Docker image of your service or application. What is required from your container is that it can be configured through the environment variable PORT
what port it listens to. Below is an example of a Dockerfile and entrypoint-script for a web application:
# Stage 1: Build the app
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Setup the Nginx Server to serve the app
FROM nginx:stable-alpine3.17 AS production
COPY --from=build /app/dist /usr/share/nginx/html
COPY ./entrypoint.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["./entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
and the entrypoint.sh
script referred to above:
#!/bin/sh
BIND_PORT="${PORT:-8080}"
echo "server { listen $BIND_PORT; server_name _; root /usr/share/nginx/html; location / { try_files \$uri /index.html; } }" > /etc/nginx/conf.d/default.conf
exec "$@"
If you want a user to be able to provide configurations when creating an instance of your open web service or application you do that by passing on environment variables. When submitting the project you can specify what environment variables your service requires.
Step 2: Submit your repository
When your repository is ready to be submitted you follow these steps to submit your repository:
- Login or signup to Eyevinn Open Source Cloud.
- Go to your tenant page by clicking on the item "Tenant" in the navigation menu on the left.
- Click on the tab "My service inbox"
- Enter the public URL to your GitHub repository
- If your service expects additional environment variables toggle the "Enable env variables" option and enter the environment variables needed. It can for example be a database connection string or URL.
- Click on the button "Add new repository" to submit it.
Now your code is in review and you can go in and check the status of your submission here on the same page.
Claim Ownership
If you find that one of the open source projects that we have made available as a service is one of the projects you own and maintain you can claim the ownership and get a share of the revenue your service(s) generates. Follow the steps below to claim ownership.
Step 1: Connect with GitHub
- Sign up for an Open Source Cloud account if you don't already have one.
- Click on the menu item Settings on the left. Select the tab GitHub and connect your account with GitHub by clicking the button Connect to GitHub.
Step 2: Select GitHub organization
When your account is connected with GitHub you will get a list of GitHub organization that you own. Enable the organization that holds the open source project you want to claim.
If everything checks out you will get a notification that the open source project is now claimed by you. To show what projects you own you go to the tab My services on the Tenant page.