-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from nsbradford/nick10-30-add_devcontainer
add devcontainer
- Loading branch information
Showing
4 changed files
with
109 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | ||
{ | ||
"name": "TalkForm", | ||
|
||
"dockerFile": "../Dockerfile", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
// "image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bullseye", | ||
|
||
|
||
// https://community.doppler.com/t/vscode-container-support/104 | ||
// https://community.doppler.com/t/doppler-and-github-codespaces/989/2 | ||
"containerEnv": { | ||
"DOPPLER_TOKEN": "${localEnv:DOPPLER_CLI_TOKEN}" | ||
}, | ||
|
||
// "features": { | ||
// "ghcr.io/devcontainers-contrib/features/supabase-cli:1": {} | ||
// }, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// "settings": { | ||
// "terminal.integrated.shell.linux": "/bin/bash" | ||
// }, | ||
|
||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ | ||
3000 | ||
], | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {} | ||
} | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// TODO yarn install probably should be cached in Dockerfile | ||
// "postCreateCommand": "yarn install", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": { | ||
// "vscode": { | ||
// "settings": {}, | ||
// "extensions": [ | ||
// "dbaeumer.vscode-eslint", | ||
// "eamodio.gitlens", | ||
// "esbenp.prettier-vscode", | ||
// "GitHub.copilot", | ||
// "k--kato.intellij-idea-keybindings", | ||
// "Orta.vscode-jest" | ||
// ] | ||
// } | ||
// } | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
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,32 @@ | ||
# Use the specified image | ||
# this had trouble with the `yarn install` | ||
# FROM mcr.microsoft.com/devcontainers/typescript-node:1-18-bullseye | ||
# FROM node:18.15.0-alpine | ||
FROM node:18.15.0-bullseye-slim | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# RUN apk add --no-cache yarn | ||
RUN apt-get update && apt-get install -y \ | ||
python3 \ | ||
make \ | ||
g++ | ||
|
||
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg && \ | ||
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg && \ | ||
echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | tee /etc/apt/sources.list.d/doppler-cli.list && \ | ||
apt-get update && \ | ||
apt-get -y install doppler | ||
|
||
# Copy package.json and yarn.lock into the working directory | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dependencies using yarn | ||
RUN yarn install --frozen-lockfile | ||
|
||
# Copy the rest of the project files into the working directory | ||
COPY . . | ||
|
||
# Expose the port your app runs on | ||
EXPOSE 3000 |
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