Skip to content

Commit

Permalink
devcontainer: Install ngrok and override default environment by .env …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
hakatashi committed Oct 14, 2024
1 parent bb283cf commit 10b7bc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .devcontainer/slackbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
FROM node:20-bookworm

# Install build dependencies for node-canvas
# https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems
RUN apt-get update -y && \
# Install build dependencies for node-canvas
# https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems
apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev -y && \
# Install git and bash
apt-get install git bash -y && \
# Install ngrok
curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc > /dev/null && \
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list && \
apt-get update && \
apt-get install ngrok -y && \
# Install slackbot npm dependencies
mkdir -p ~/.cache/slackbot/node_modules && \
mkdir -p ~/.cache/slackbot-functions/node_modules && \
git clone https://github.com/tsg-ut/slackbot.git --branch master --single-branch --recursive --depth 1 /code && \
cd /code && \
npm install && \
# Cleanup
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'canvas';

import dotenv from 'dotenv';

dotenv.config();
dotenv.config({ override: true });

import Fastify from 'fastify';
import qs from 'querystring';
Expand Down

0 comments on commit 10b7bc4

Please sign in to comment.