summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: fe64736ef8884d518d6d7685836f7c904b44cb65 (plain)
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
FROM nikolaik/python-nodejs:python3.8-nodejs14
MAINTAINER OpenDC Maintainers <opendc@atlarge-research.com>

## Dockerfile for the frontend/server part of the deployment

# Installing packages
RUN apt-get update \
	&& apt-get install -y yarn git sed

# Copy OpenDC directory
COPY ./ /opendc

# Fetch web server dependencies
RUN pip install -r /opendc/web-server/requirements.txt

# Build frontend
RUN cd /opendc/frontend \
	&& rm -rf ./build \
	&& yarn \
	&& export REACT_APP_OAUTH_CLIENT_ID=$OPENDC_OAUTH_CLIENT_ID \
	&& yarn build

# Set working directory
WORKDIR /opendc

CMD ["sh", "-c", "python web-server/main.py"]