firecamp-dev / firecamp

Developer-first OpenSource API DevTool, Postman/Insomnia alternative.
https://firecamp.dev
GNU Affero General Public License v3.0
1.92k stars 120 forks source link

Tracking Self-hosting support via pre-built container image for docker-compose stack #231

Open jo-chemla opened 3 months ago

jo-chemla commented 3 months ago

Is your feature request related to a problem? Please describe. The firecamp roadmap references supporting self-hosting. This issue is created for people to track progress of self-hosting

Describe the solution you'd like Publishing pre-built container images on docker-hub or ghcr would be useful for self-hosters to host firecamp on their onwn terms and server. Accompanying the container image with an example docker-compose yaml stack would also be useful to facilitate self-hosting.

Describe alternatives you've considered Using the desktop app.

Additional context Could be published afterwards to awesome-selfhosted for increased coverage

artu-ole commented 1 month ago

Building and self-hosting the ui is trivial with something like this. Surely it can be added to CI as well to publish automatic containers on release. But I don't agree that this is self-hosting until you can run your own backend. I'd argue that this project shouldn't advertise as open source until that happens either. I was very exited when I first came to the website, just to be letdown by the fact that this follows same cloud-first nonsense as postman and insomnia.

git clone --branch v3.3.0-beta.3 https://github.com/firecamp-dev/firecamp
cd firecamp
echo -e 'FIRECAMP_API_HOST="https://api-development.firecamp.dev"\nNODE_ENV="production"' > .env
# or on windows in PowerShell
'FIRECAMP_API_HOST="https://api-development.firecamp.dev"','NODE_ENV="production"' | Out-File .env
npm install -g pnpm
pnpm install
pnpm build

create nginx.conf

server {
    listen       80;
    listen  [::]:80;
    server_name  localhost;
    location / {
        root   /usr/share/nginx/html;
        try_files $uri $uri/ /index.html;
    }
}

create Dockerfile

FROM nginx:stable-alpine
COPY build/production /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

build and run

docker buildx build -t firecamp:v3.3.0-beta.3 .
docker run -p 8080:80 firecamp:v3.3.0-beta.3