-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
96 lines (71 loc) · 2.52 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Docker Image for Isomer
#
# This image essentially packages up Isomer and instantiates a default
# blank instance. This can be used to add further modules and customize.
#
# Since it doesn't make sense to run two services in one container, to run
# an additional compliant database, have a look at docker-compose.yml
#
# Usage Examples::
#
# To run your instance and see if the backend starts:
# $ docker run -i -t isomeric/isomer iso --dbhost MYDATABASEHOST:27017 launch
#
# If everything built fine, point your browser to http://localhost:8000 to
# interact with the frontend.
#
# To investigate problems on the docker container, i.e. get a shell:
# $ docker run -i -t isomeric/isomer iso instance info
# $ docker run -i -t isomeric/isomer /bin/bash
#
# See
# https://isomer.readthedocs.io/en/latest/dev/system/docker.html#isotool-docker
# for more details.
#
# VERSION: 1.3.0
#
# Last Updated: 20200303
FROM debian:unstable
MAINTAINER Heiko 'riot' Weinen <riot@isomer.eu>
# Install dependencies
RUN echo "C.UTF-8" > /etc/locale.gen
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN apt-get update && \
apt-get install -y --no-install-recommends \
enchant git apt-transport-https wget sudo gnupg virtualenv autoconf \
ca-certificates build-essential libffi-dev libpng-dev npm nodejs \
python3 python3-dev python3-pip python3-setuptools python3-enchant \
python3-pil python3-nacl python3-spur python3-bson python3-pymongo \
python3-cffi python3-openssl python3-bcrypt python3-wheel nginx \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y --no-install-recommends --ignore-missing \
python3-pymongo-ext python3-bson-ext \
&& rm -rf /var/lib/apt/lists/* || :
WORKDIR /home/isomer
# Copy requirements
COPY requirements-prod.txt requirements-doc.txt requirements.txt ./
# Install requirements
RUN pip3 install -r requirements-prod.txt
# Copy Isomer
COPY . isomer
WORKDIR isomer
RUN python3 setup.py develop
RUN ./iso system -l --omit-platform all
# Install instance
RUN ./iso instance create
RUN ./iso instance install -s copy -u /home/isomer/isomer --skip-provisions
RUN ./iso instance info
RUN ./iso instance set web_port 8000
RUN ./iso instance cert --selfsigned
RUN ./iso instance info
RUN ./iso instance update-nginx
RUN cat /etc/nginx/sites-enabled/*
# Services
EXPOSE 80 443
# There is a frontend development server with hot reloading which can be started with
# $ isomer/frontend/npm run start
# If you want to run the frontend development live server, uncomment this:
#
# EXPOSE 8081