Skip to content

Commit

Permalink
chore: use busybox instead of nginx
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
simonwep committed Nov 5, 2023
1 parent 170eacf commit 17b6b52
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,19 @@ jobs:
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
build-args: |
OCULAR_GENESIS_HOST=${{ env.OCULAR_GENESIS_HOST }}
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:20-alpine AS build
FROM --platform=$BUILDPLATFORM node:20-alpine AS build

ARG OCULAR_GENESIS_HOST

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

RUN corepack enable
RUN npx pnpm install --global pnpm@8
WORKDIR /app

COPY package.json pnpm-lock.yaml /app/
Expand All @@ -14,12 +14,11 @@ RUN pnpm install --frozen-lockfile
COPY . /app
RUN pnpm run build

FROM nginx:1.25-alpine
FROM busybox:1.36.1-musl

RUN rm /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
COPY --from=build /app/config/nginx.conf /etc/nginx/conf.d
WORKDIR /home/static
COPY --from=build /app/dist /home/static

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
CMD ["busybox", "httpd", "-v", "-f"]
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
src="https://github.com/Simonwep/ocular/workflows/CI/badge.svg"/></a>
</p>

### Table of contents

* [Features](#features) - _What does this app do?_
* [Summary](#summary) - _What is this app?_
* [Setup](#setup) - _How to set this up?_
* [Development](#development) - _How to run this locally?_
* [Production](#production) - _How to deploy this?_

### Features

- 🦾 Self-hosted.
Expand All @@ -38,21 +46,21 @@ The goal of the app is **not** to track individual expenses, work with multiple
This app comes with its own backend (by using [genesis](https://github.com/simonwep/genesis)), so the only thing you need to do is to host it somewhere.
Your data stays on your server and is not shared with anyone else.

### State of this project

I consider the current state of it as the MVP for personal use.
But I'm planning on adding more [features](https://github.com/Simonwep/ocular/issues) - I'm not planning of making it any more in-depth as it already is, planned features may only include adding a way to define goals or general improvements for mobile usage.
As I already said, if you're looking for an in-depth tool to manage your finances check out [firefly](https://www.firefly-iii.org/)!

### Development
### Setup

#### Development

This app uses [genesis](https://github.com/simonwep/genesis) as generic backend.
Go to the [genesis](https://github.com/simonwep/genesis) repository and follow the instructions to set it up first.

To run the frontend make sure you have the latest [node LTS](https://nodejs.org/en/) installed, as well as [pnpm](https://pnpm.io/).
You can then start the frontend by running `pnpm run dev` in the root directory.

### Production
#### Production

This app is deployed using [docker-compose](https://docs.docker.com/compose/).
See [ocular-docker](https://github.com/simonwep/ocular-docker) for deployment.
Expand Down
10 changes: 0 additions & 10 deletions config/nginx.conf

This file was deleted.

0 comments on commit 17b6b52

Please sign in to comment.