Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add a production container image to run it on own server. #2031

Closed
aleleba opened this issue Oct 12, 2024 · 2 comments
Closed

Feature: Add a production container image to run it on own server. #2031

aleleba opened this issue Oct 12, 2024 · 2 comments

Comments

@aleleba
Copy link

aleleba commented Oct 12, 2024

I do not know if there is on the plan, but should be great to have the oportunity to run the project inside a docker container or in podman, should be great to try to run it locally in an easy way.

It should be great to prepare on the CI/DC Pipeline the publishing of a new image on a container repo, so the comunity can run it locally.

Thank you in advance, also I can get some hands on to help you to acomplish this 👍🏼

@Keavon
Copy link
Member

Keavon commented Oct 12, 2024

You can download the static assets for the build from graphite-self-hosted-build.zip at https://github.com/GraphiteEditor/Graphite/releases/tag/latest-stable. You can locally serve these static assets from any simple HTTP server and open it at localhost, so there's no need for a Docker container. But you'll have to keep checking for updates regularly, so I recommend just using our CDN's hosting of the static assets through https://editor.graphite.rs unless you need to run in an environment without reliable internet access, in order to benefit from updates when they're available.

@Keavon Keavon closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2024
@github-project-automation github-project-automation bot moved this from Short-Term to Completed This Milestone in Task Board Oct 12, 2024
@Keavon Keavon removed this from Task Board Oct 12, 2024
@ecker00
Copy link

ecker00 commented Jan 18, 2025

My fist go to is looking for Docker image for any project. But you were right, this was super easy to setup!

For other lazy people who arrive here, this is how:

mkdir -p ./GraphiteEditor
cd ./GraphiteEditor

# Make docker compose
echo 'services:
  webserver:
    image: nginx:latest
    ports:
      - "5656:80"
    volumes:
      - ./app:/usr/share/nginx/html
' > compose.yml

# Make update script
echo '#!/bin/zsh
rm -rf ./app # Delete old version if exist
wget https://github.com/GraphiteEditor/Graphite/releases/download/latest-stable/graphite-self-hosted-build.zip
unzip ./graphite-self-hosted-build.zip
rm ./graphite-self-hosted-build.zip
mv graphite-* app # Rename' > update.sh

# Pull and start
chmod +x update.sh # Allow execute
./update.sh # Run the update script
docker compose up -d # Start container

Done, access on: http://localhost:5656 and re-run the update script to get latest changes.

Note: The extracted folder in named something like graphite-2025-01-09 so the script needs to work around that to a predictable name (like /app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants