-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
32 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 |
---|---|---|
@@ -1,34 +1,6 @@ | ||
FROM python:3.9-buster | ||
COPY . /workspaces/ubyssey.ca/ | ||
WORKDIR /workspaces/ubyssey.ca/ | ||
# Installs some basics | ||
RUN apt-get update | ||
RUN apt-get install -y git | ||
RUN apt-get install -y curl | ||
# Installs Node 14.x and npm 6.x | ||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - | ||
RUN apt-get install -y nodejs | ||
# Install the Django app’s dependencies | ||
RUN pip install -r requirements.txt | ||
# Set up static files - clears old old version of node_modules that may be around, tides up new version | ||
WORKDIR /workspaces/ubyssey.ca/ubyssey/static_src/ | ||
RUN rm -rf node_modules | ||
RUN npm install | ||
RUN npm install -g gulp | ||
RUN npm rebuild node-sass | ||
RUN gulp buildDev | ||
RUN rm -rf node_modules | ||
|
||
# See https://stackoverflow.com/questions/28372328/how-to-install-the-google-cloud-sdk-in-a-docker-image | ||
# Downloading gcloud package | ||
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz | ||
FROM python:3.9-bullseye | ||
|
||
# Installing the package | ||
RUN mkdir -p /usr/local/gcloud \ | ||
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \ | ||
&& /usr/local/gcloud/google-cloud-sdk/install.sh | ||
COPY . /app | ||
WORKDIR /app | ||
|
||
# Adding the package path to local | ||
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin | ||
|
||
WORKDIR /workspaces/ubyssey.ca/ | ||
RUN pip install -r requirements.txt |