-
Notifications
You must be signed in to change notification settings - Fork 23
/
Dockerfile
57 lines (37 loc) · 1.49 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM python:3.9-buster
EXPOSE 8080
ARG workspace="none"
RUN apt-get update \
&& apt-get install --assume-yes wget
RUN wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/backend-project/python/pre-build.sh
RUN chmod 775 ./pre-build.sh
RUN sh pre-build.sh
RUN wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/backend-project/database/db-setup.sh
RUN chmod 775 ./db-setup.sh
RUN sh db-setup.sh
# Install Workspace for Python
RUN if [ $workspace = "theia" ] ; then \
wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/theia/pre-build.sh \
&& chmod 775 ./pre-build.sh && sh pre-build.sh ; fi
WORKDIR /var/
RUN if [ $workspace = "theia" ] ; then \
wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/theia/build.sh \
&& chmod 775 ./build.sh && sh build.sh ; fi
# Get RUN Script
WORKDIR /var/theia/
RUN if [ $workspace = "theia" ] ; then \
wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/theia/run.sh \
&& chmod 775 ./run.sh ; fi
# End Install for Workspace
RUN mkdir -p /var/app
WORKDIR /var/app
ADD requirements.txt /var/app
# Build the app
RUN wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/backend-project/python/build.sh
RUN chmod 775 ./build.sh
RUN sh build.sh
ADD . .
# Run the app
RUN wget https://codejudge-starter-repo-artifacts.s3.ap-south-1.amazonaws.com/backend-project/python/django/run-2.sh
RUN chmod 775 ./run-2.sh
CMD sh run-2.sh