Comments (6)
Get bob ready for aws deployment in the future
from yet-another-better-office-hour-bot.
Already on AWS
from yet-another-better-office-hour-bot.
Manual deployment is quite error prone, we will need to setup at least a beta stage and a prod stage and CI/CD
from yet-another-better-office-hour-bot.
we could try to use this to do it maybe? We already have scripts to copy files and there is only one sequence of commands we use to deploy the bot on aws (ssh, then pm2 stop , and pm2 start)
from yet-another-better-office-hour-bot.
docker stuff
FROM node:lts-alpine3.17
WORKDIR /docker_out
COPY package.json package-lock.json /docker_out/
RUN npm install
COPY . /docker_out/
CMD npm run dev
#or CMD npm run prod
from yet-another-better-office-hour-bot.
more complicated dockerfile
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/engine/reference/builder/
ARG NODE_VERSION=lts
################################################################################
# Use node image for base image for all stages.
FROM node:${NODE_VERSION}-alpine as base
# Set working directory for all build stages.
WORKDIR /usr/src/app
################################################################################
# Create a stage for installing production dependecies.
FROM base as deps
# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.npm to speed up subsequent builds.
# Leverage bind mounts to package.json and package-lock.json to avoid having to copy them
# into this layer.
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev
################################################################################
# Create a stage for building the application.
FROM deps as build
# Download additional development dependencies before building, as some projects require
# "devDependencies" to be installed to build. If you don't need this, remove this step.
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci
# Copy the rest of the source files into the image.
COPY . .
# Run the build script.
RUN npm run build
################################################################################
# Create a new stage to run the application with minimal runtime dependencies
# where the necessary files are copied from the build stage.
FROM base as final
# Use production node environment by default.
# ENV NODE_ENV development
# Run the application as a non-root user.
USER node
# Copy package.json so that package manager commands can be used.
COPY package.json .
# Copy the production dependencies from the deps stage and also
# the built application from the build stage into the image.
COPY --from=deps /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/dist ./dist
# Run the application.
CMD npm start
from yet-another-better-office-hour-bot.
Related Issues (20)
- `/assign_helper_roles` sometimes thinks that members aren't in the server HOT 2
- Consistent emoji style in embed buttons HOT 1
- Better tutoring timesheet implementation HOT 1
- ANSI colors in embeds
- Move to a dedicated YABOB account
- Queue integrity check HOT 1
- Single source of truth for queue names HOT 1
- Race condition in google sheets attendance update
- `Total Session Time` from `/stats server` is always 0
- DAO for databases
- Write attendance entries to both google sheets and firebase
- API to access logging data from YABOB HOT 2
- Use Firebase instead of Google Sheets for Attendance and Help Session Tracking
- Track tutees if they have spoken in the voice call HOT 4
- Emit discord js events directly to server & interaction level extensions
- Schema updates
- Remove `queueChannelsCache` in `AttendingServer`
- Update all the documentation links in `src` HOT 1
- Send a reminder when tutors forget to stop
- Use `message.createMessageComponentCollector`for non-permanent buttons HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yet-another-better-office-hour-bot.