summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 50af30b132c0e6da3e70c5434e54b712af645ada (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
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 \
	&& yarn build

# Set working directory
WORKDIR /opendc

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