Code Monkey home page Code Monkey logo

lolibrary's Introduction

Lolibrary

Lolibrary is a lolita fashion archive website. This repository is a monorepo containing code for what will eventually be all of Lolibrary.

Getting Started

To get started, you'll need to install Docker and the go compiler. You'll also need kubectl at a minimum, and if you're a Lolibrary core dev, access to our GKE cluster (ask on Discord, and use your @lolibrary.org email).

As a note, this only really supports macOS right now.

First, run ./bin/install. This will compile all Go tools and stick them into $GOPATH/bin. Add this to your path if needed!

πŸ’» On macOS, you can install Homebrew to get all of these tools.

Running internal tools

HTTPS certificate

Lolibrary's ingress in dev should be running on HTTPS, as that assumption is made everywhere.

There is a self-signed certificate in the pki folder of this repository; you should trust this certificate on your development machine.

Then, provided you follow the guidance below, you'll be able to reach:

  • lolibrary.test:443 (main user frontend)
  • api.lolibrary.test:443 (all services that start with service.api.)
  • admin.lolibrary.test:443 (admin user frontend)
  • image-proxy.lolibrary.test:443 (a proxy to our configured CDN so that you load images locally)

This is only needed when running full tests across the entire platform. In most cases when you test a service in isolation you don't use the ingress, so you can just find it on localhost.

Hostnames

Add a dns resolver such as dnsmasq to resolve all .test domains to localhost. This will be needed! (setup.sh, again, does this automatically on Mac).

On windows, you can get away with just adding lolibrary.test and related domains to your hosts file pointing to 127.0.0.1

Security Vulnerabilities

If you discover a security vulnerability within this repo, email [email protected]. All security vulnerabilities will be promptly addressed.

License

Lolibrary's code is licenced under the BSD Licence.

You may not use any of Lolibrary Inc's logos or trademarks without prior written permission.

Lolibrary Inc is a 501(c)(3) non-profit incorporated in the USA.

lolibrary's People

Contributors

ameliaikeda avatar frontsideair avatar ianmcorvidae avatar mellievt avatar narfzz avatar suyanhanx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lolibrary's Issues

Set up Travis CI

We need automated testing for PHP services (e.g. the website), as well as Go services (e.g. the API).

For now, let's just add a Travis CI matrix per-service.

We need CI/CD set up for our GKE cluster

Currently, deploying is just something I run manually on my laptop, via build scripts in a private repo (https://github.com/lolibrary/build for org members).

We can more-or-less port these to github actions and use GCP's GitHub actions toolkit to interact with kubernetes.

We can also have a two-stage build process for staging/production and require tests to pass first.

Set up staging/production namespaces with a single ingress

This is a little project I've been working on.

We can have our ingress (a LoadBalancer) set up in the default namespace. This can then route to an ingress we have inside multiple namespaces based on hostname, e.g.:

  • lolibrary.org -> production
  • lolibrary.space -> staging
  • lolibrary.test -> local

We can stick with host-based routing at the moment, too - api., etc can go to service.api, apex -> service.sakura.

We can stick with cluster DNS for now, and use a service mesh later if needed.

Windows Docker (Toolbox) Service lolibrary_www Start Error - Mount a directory onto a file error.

Dear Lolibrary Community,

I tried to build and run the Lolibrary on Windows 10 x64, unfortunately I got the following error message:

docker error

ERROR: for lolibrary_www.lolibrary.test_1
Cannot start service www.lolibrary.test:
OCI runtime create failed:
container_linux.go:348:
starting container process caused "process_linux.go:402:
container init caused "rootfs_linux.go:58:
mounting \"/host_mnt/e/lolibrary/.env\"
to rootfs \"/var/lib/docker/overlay2/c64e98c6fd0e2bc401e80ace3e12cf2df04f203e0d693e80ff3eccf238f26e3d/merged\"
at \"/var/lib/docker/overlay2/c64e98c6fd0e2bc401e80ace3e12cf2df04f203e0d693e80ff3eccf238f26e3d/merged/secrets/environment/.env\"
caused \"not a directory\""":
unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

It fails when trying to start lolibrary_www.lolibrary.test_1 service.

Besides that I created a Powershell Script to make it possible to install the required things on Windows.
And everything install (rename .var.example, certificate, docker pull) as required works and is tested on Windows 10 (script as file can be seen on my fork).

powershell install script

I do currently not understand what the problem is and what the cause is. I did already Googled about it, but not with any success.

https://groups.google.com/forum/#!topic/awx-project/2F5dJIdmdXw
https://forums.docker.com/t/solved-error-for-httpd-oci-runtime-error-rootfs-linux-go-53-mounting-to-rootfs-caused-not-a-directory/17509/3
https://community.tyk.io/t/how-can-i-fix-the-error-mounting-caused-not-a-directory-when-using-docker-compose/1068/5

Drivers are shared

shared drive

Docker Version

docker version

Even if I tried it with docker Toolbox but unfortunately it is raising approximately the same error, but now when it is trying to start the proxy.

docker toolbox

I hope you can help.

Yours sincerely,
Chun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.