Skip to content

Commit

Permalink
redis, yarn, and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantanen committed Feb 7, 2025
1 parent 406a82a commit 781d6a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
16 changes: 14 additions & 2 deletions docker/waypoint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-instal
&& ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata

RUN apt-get update && apt-get install -y postgresql postgresql-contrib
RUN apt-get update && apt-get install -y postgresql postgresql-contrib redis-server \
&& rm -rf /var/lib/apt/lists/*

# expose ports
EXPOSE 5432
EXPOSE 3000
EXPOSE 8000

# Install nvm, node, and npm
# Install nvm, node, and npm, yarn
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 22

Expand All @@ -33,6 +39,12 @@ RUN mkdir -p $NVM_DIR && \
nvm alias default $NODE_VERSION && \
nvm use default

RUN . $NVM_DIR/nvm.sh && npm install -g yarn

# start redis and postgres service
RUN redis-server --daemonize yes
RUN service postgresql start

# For each product, setup the python environment
RUN mkdir /opt/waypoint/
COPY waypoint-init /opt/waypoint/waypoint-init
Expand Down
9 changes: 4 additions & 5 deletions docker/waypoint/waypoint-init
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ for product in "${!PRODUCT_TO_SHA[@]}"; do
curl -o $PRODUCT_PATH/Pipfile "https://raw.githubusercontent.com/pennlabs/$product/$sha/backend/Pipfile"
curl -o $PRODUCT_PATH/Pipfile.lock "https://raw.githubusercontent.com/pennlabs/$product/$sha/backend/Pipfile.lock"

pipenv requirements > $PRODUCT_PATH/requirements.txt

uv venv "$PRODUCT_PATH/venv" --python 3.11
source "$PRODUCT_PATH/venv/bin/activate" && uv pip install -r $PRODUCT_PATH/requirements.txt
cd $PRODUCT_PATH
source "$PRODUCT_PATH/venv/bin/activate" && pipenv requirements --dev > requirements.txt && uv pip install -r $PRODUCT_PATH/requirements.txt
done

for product in "${!PRODUCT_TO_SHA[@]}"; do
PRODUCT_CODE_PATH="/usr/$product"
git clone "https://github.com/pennlabs/$product.git"
PRODUCT_CODE_PATH="/usr"
cd "$PRODUCT_CODE_PATH"
git clone "https://github.com/pennlabs/$product.git"
echo "Finished cloning $product"
done

Expand Down

0 comments on commit 781d6a6

Please sign in to comment.