Skip to content

Commit

Permalink
deploy: add dotenv production key to github repo. This is safe, it do…
Browse files Browse the repository at this point in the history
…esn't contain any secrets
  • Loading branch information
jinho-choi123 committed May 10, 2024
1 parent d2d61c8 commit c70466a
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 15 deletions.
8 changes: 8 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## VITE_API_SERVER_URL should end without "/"
VITE_API_SERVER_URL=https://zabo.sparcs.org/api
VITE_ANIMATION_DURATION=3200
VITE_TRANSITION_INTERVAL=10000

## put s3 url for initial content for zabo boards
VITE_INIT_CONTENT1=https://sparcs-kaist-zabo-prod.s3.ap-northeast-2.amazonaws.com/zabo/zabo-136431583315238282https://sparcs-kaist-zabo-prod.s3.ap-northeast-2.amazonaws.com/zabo/zabo-136431583315238282
VITE_INIT_CONTENT2=https://sparcs-kaist-zabo-prod.s3.ap-northeast-2.amazonaws.com/zabo/zabo-136431583315238282https://sparcs-kaist-zabo-prod.s3.ap-northeast-2.amazonaws.com/zabo/zabo-136431583315238282
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ web_modules/
# dotenv environment variable files
.env
.env.development
.env.production
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
Expand Down
58 changes: 45 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,51 @@
# React + TypeScript + Vite
# Zabo Boards

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## About
Zabo Boards helps **KAIST students based** individuals or clubs advertising themselves via TV screen in open space.
While this service is open for public, **only approved groups** are able to post images.
Please submit your request in order to create a new group via our website.

Currently, two official plugins are available:
This project is being maintained by [SPARCS KAIST](https://github.com/sparcs-kaist)

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
We're expecting our users post there recruiting announcements, performance schedules, and any other events advertisments.
However, there's no strict restrictions on contents that users upload.

## Deploy
**Prerequisites**
Please contact us to get more detailed information.

1. Need a zabo-boards package in sparcs-kaist organization.
2. Need to login to sparcs-kaist using Github Token and Github CLI.
If you're looking for backend codes, you can find it in [here](https://github.com/sparcs-kaist/zabo-server-nodejs)

**Procedure**
1. Run `git clone https://github.com/sparcs-kaist/zabo-boards.git`
2. Run `docker compose -p zabo-boards -f .docker/docker-compose.yaml up`
3. After Step 2, watch-tower will automatically pull latest zabo-boards package and redeploy.
## Table of Contents

## Prerequisites

**You'll need to have Node 18.18.2 in local development and production machine**

You can use [fnm](https://github.com/Schniz/fnm). That's all you need.

```shell
$ node -v // v18.18.2
```

## Getting Started

### Running Development Server

Run server
```shell
$ cp .env.example .env.development // copy config

$ vim .env.development // setup configuration

$ yarn // Installing dependencies

$ yarn dev // used vite for project configuration. yarn dev will run vite development server
```

### Running Production Server
```shell
$ // check if there is a zabo-boards package in sparcs-kaist organization
$ git clone https://github.com/sparcs-kaist/zabo-boards.git // clone repo
$ cp .env.example .env.production // copy config
$ docker compose -p zabo-boards -f .docker/docker-compose.yaml up -d // run zabo boards server

```

0 comments on commit c70466a

Please sign in to comment.