diff --git a/.devcontainer/codespaces/devcontainer.json b/.devcontainer/devcontainer.json similarity index 97% rename from .devcontainer/codespaces/devcontainer.json rename to .devcontainer/devcontainer.json index 06cc85e..972285a 100644 --- a/.devcontainer/codespaces/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "name": "TalkForm", // NOTE: because codespaces automatically - "dockerFile": "../../Dockerfile.codespaces", + "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", diff --git a/.devcontainer/local/deprecated-Dockerfile b/.devcontainer/local/deprecated-Dockerfile new file mode 100644 index 0000000..86ea5d2 --- /dev/null +++ b/.devcontainer/local/deprecated-Dockerfile @@ -0,0 +1,33 @@ +# 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 + +# necessary for some of the npm packages +RUN apt-get update && apt-get install -y \ + python3 \ + make \ + g++ + +# https://docs.doppler.com/docs/install-cli +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 \ No newline at end of file diff --git a/.devcontainer/local/devcontainer.json b/.devcontainer/local/deprecated-devcontainer.json similarity index 100% rename from .devcontainer/local/devcontainer.json rename to .devcontainer/local/deprecated-devcontainer.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..41f5221 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# 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 + +# codespaces automatically clones the repo into /workspaces/ +# WORKDIR /app + +# necessary for some of the npm packages +RUN apt-get update && apt-get install -y \ + python3 \ + make \ + g++ + +# https://docs.doppler.com/docs/install-cli +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 + +# codespaces automatically clones the repo into /workspaces/ +# COPY package.json yarn.lock ./ + +# codespaces automatically clones the repo into /workspaces/ +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 \ No newline at end of file