Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sytone/obsidian-remote
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: sytone/obsidian-remote
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -9,3 +9,8 @@ updates:
directory: '/' # Location of package manifests
schedule:
interval: 'daily'

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
10 changes: 5 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -21,11 +21,11 @@ jobs:
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')"

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/obsidian-remote
tags: |
@@ -35,17 +35,17 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
#file: ./Dockerfile
76 changes: 76 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Docker

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- latest
- main
paths-ignore:
- 'README.MD'
- '.github'

jobs:
build:
name: build
runs-on: ubuntu-latest

permissions:
packages: write
contents: read

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Log in to the Container registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GIT_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:latest
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_amd64
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_amd64,mode=max

# - name: Build and push Docker images
# uses: docker/build-push-action@v5
# with:
# context: .
# file: Dockerfile.arm64
# platforms: linux/arm64
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:arm64
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_arm64
# cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_arm64,mode=max
88 changes: 37 additions & 51 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,41 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal

LABEL org.opencontainers.image.authors="github@sytone.com"
LABEL org.opencontainers.image.source="https://github.com/sytone/obsidian-remote"
LABEL org.opencontainers.image.title="Container hosted Obsidian MD"
LABEL org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"

RUN \
echo "**** install packages ****" && \
# Update and install extra packages.
apt-get update && \
apt-get install -y --no-install-recommends \
# Packages needed to download and extract obsidian.
curl \
libnss3 \
# Install Chrome dependencies.
dbus-x11 \
uuid-runtime && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

# set version label
ARG OBSIDIAN_VERSION=0.13.31

RUN \
echo "**** download obsidian ****" && \
curl \
https://github.com/obsidianmd/obsidian-releases/releases/download/v$OBSIDIAN_VERSION/Obsidian-$OBSIDIAN_VERSION.AppImage \
-L \
-o obsidian.AppImage

RUN \
echo "**** extract obsidian ****" && \
chmod +x /obsidian.AppImage && \
/obsidian.AppImage --appimage-extract

ENV \
CUSTOM_PORT="8080" \
GUIAUTOSTART="true" \
HOME="/vaults" \
TITLE="Obsidian v$OBSIDIAN_VERSION"

# add local files
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm

LABEL maintainer="github@sytone.com" \
org.opencontainers.image.authors="github@sytone.com" \
org.opencontainers.image.source="https://github.com/sytone/obsidian-remote" \
org.opencontainers.image.title="Container hosted Obsidian MD" \
org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"

# Set version label
ARG OBSIDIAN_VERSION=1.7.7

# Update and install extra packages
RUN echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends curl libgtk-3-0 libnotify4 libatspi2.0-0 libsecret-1-0 libnss3 desktop-file-utils fonts-noto-color-emoji git ssh-askpass && \
apt-get autoclean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

# Download and install Obsidian
RUN echo "**** download obsidian ****" && \
curl --location --output obsidian.deb "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian_${OBSIDIAN_VERSION}_amd64.deb" && \
dpkg -i obsidian.deb && \
rm obsidian.deb

# Environment variables
ENV CUSTOM_PORT="8080" \
CUSTOM_HTTPS_PORT="8443" \
CUSTOM_USER="" \
PASSWORD="" \
SUBFOLDER="" \
TITLE="Obsidian v${OBSIDIAN_VERSION}" \
FM_HOME="/vaults"

# Add local files
COPY root/ /

EXPOSE 8080
EXPOSE 27123
EXPOSE 27124
# Expose ports and volumes
EXPOSE 8080 8443
VOLUME ["/config","/vaults"]


# Define a healthcheck
HEALTHCHECK CMD /bin/sh -c 'if [ -z "$CUSTOM_USER" ] || [ -z "$PASSWORD" ]; then curl --fail http://localhost:"$CUSTOM_PORT"/ || exit 1; else curl --fail --user "$CUSTOM_USER:$PASSWORD" http://localhost:"$CUSTOM_PORT"/ || exit 1; fi'
44 changes: 44 additions & 0 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm

LABEL maintainer="github@sytone.com" \
org.opencontainers.image.authors="github@sytone.com" \
org.opencontainers.image.source="https://github.com/sytone/obsidian-remote" \
org.opencontainers.image.title="Container hosted Obsidian MD" \
org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"

# Set version label
ARG OBSIDIAN_VERSION=1.7.7
ARG ARCH=arm64

# Update and install extra packages
RUN echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends curl libnss3 zlib1g-dev dbus-x11 uuid-runtime && \
apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

# Download and install Obsidian
RUN echo "**** download obsidian ****" && \
curl -L -o ./obsidian.AppImage \
"https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/Obsidian-${OBSIDIAN_VERSION}-${ARCH}.AppImage" && \
chmod +x ./obsidian.AppImage && \
./obsidian.AppImage --appimage-extract && \
rm ./obsidian.AppImage

# Environment variables
ENV CUSTOM_PORT="8080" \
CUSTOM_HTTPS_PORT="8443" \
CUSTOM_USER="" \
PASSWORD="" \
SUBFOLDER="" \
TITLE="Obsidian v$OBSIDIAN_VERSION" \
FM_HOME="/vaults"

# Add local files
COPY root/ /

# Expose ports and volumes
EXPOSE 8080 8443
VOLUME ["/config","/vaults"]

# Define a healthcheck
HEALTHCHECK CMD /bin/sh -c 'if [ -z "$CUSTOM_USER" ] || [ -z "$PASSWORD" ]; then curl --fail http://localhost:"$CUSTOM_PORT"/ || exit 1; else curl --fail --user "$CUSTOM_USER:$PASSWORD" http://localhost:"$CUSTOM_PORT"/ || exit 1; fi'
Loading