This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
84 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
![YAPC logo](https://pomf.080609.xyz/img/logo-dark.svg)<br> | ||
[![License](https://img.shields.io/github/license/hexahigh/yapc)](https://github.com/hexahigh/yapc/blob/main/LICENSE) | ||
[![Go report card](https://goreportcard.com/badge/github.com/hexahigh/yapc/backend)](https://goreportcard.com/report/github.com/hexahigh/yapc/backend) | ||
[![Api docs](https://img.shields.io/badge/Api_docs-gray?style=flat&logo=swagger | ||
)](https://pomf-api.080609.xyz/) | ||
[![Api docs](https://img.shields.io/badge/Api_docs-gray?style=flat&logo=swagger)](https://pomf-api.080609.xyz/) | ||
[![Docker pulls](https://img.shields.io/docker/pulls/hexahigh/yapc)](https://hub.docker.com/r/hexahigh/yapc/) | ||
![Maintained](https://img.shields.io/badge/status-maintained-green.svg)<br> | ||
Yapc is yet another file sharing site inspired by pomf. | ||
The frontend is written using svelte and tailwind and the backend is written using Go. | ||
It is simplistic by design and is designed to be fast, easy to use and easy to maintain. | ||
|
||
#### Deployment and setup | ||
|
||
Since the backend was written in Go it is very easy to create your own instance. | ||
Read the [docs](https://github.com/hexahigh/yapc/blob/main/docs/installation.md) for more information. | ||
|
||
#### Running with Docker compose | ||
|
||
To run the backend and frontend using docker compose you can use the example docker-compose.yml file found in this repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM alpine:3.19 | ||
|
||
COPY --from=golang:1.22-alpine /usr/local/go/ /usr/local/go/ | ||
|
||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
||
RUN apk add --no-cache \ | ||
git \ | ||
gcc \ | ||
musl-dev | ||
|
||
RUN git clone https://github.com/hexahigh/yapc.git /source | ||
|
||
WORKDIR /source/backend | ||
|
||
ENV CGO_ENABLED=1 | ||
RUN go build -o server ./main.go | ||
|
||
RUN mv ./server /server | ||
WORKDIR / | ||
RUN rm -rf /source | ||
|
||
ENTRYPOINT [ "/server", "-d", "/data", "-db:file", "/data/yapc.db" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: '3.8' | ||
services: | ||
backend: | ||
image: hexahigh/yapc | ||
ports: | ||
- "8088:8080" # Backend port | ||
volumes: | ||
- ./data:/data | ||
environment: | ||
- YAPC_C=false # Compression | ||
- YAPC_L=3 # Compression level | ||
- YAPC_DB=mysql # Database type | ||
- YAPC_DB:USER=yapc # Database user | ||
- YAPC_DB:PASS=CHANGEME # Database password | ||
- YAPC_DB:FILE=/data/yapc.db # Database path | ||
- YAPC_DB:HOST=mysql:3306 # Database host | ||
- YAPC_DB:DB=yapc # Database name | ||
depends_on: | ||
- mysql | ||
|
||
frontend: | ||
image: hexahigh/yapc-frontend | ||
ports: | ||
- "3009:3009" # Frontend port | ||
depends_on: | ||
- backend | ||
|
||
mysql: | ||
image: mysql | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
MYSQL_ROOT_PASSWORD: CHANGEME | ||
MYSQL_DATABASE: yapc | ||
MYSQL_USER: yapc | ||
MYSQL_PASSWORD: CHANGEME | ||
volumes: | ||
- ./db:/var/lib/mysql |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:21-alpine3.19 | ||
|
||
RUN apk add --no-cache \ | ||
git | ||
|
||
RUN git clone https://github.com/hexahigh/yapc.git /source | ||
|
||
WORKDIR /source/frontend | ||
|
||
RUN npm install | ||
|
||
ENTRYPOINT [ "npm", "run", "build" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters