Skip to content

Commit 016633b

Browse files
committed
Initial WireCloud 1.4 docker image
1 parent a36137f commit 016633b

17 files changed

+1101
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
wirecloud-version:
2525
- "1.2"
2626
- "1.3"
27+
- "1.4"
2728
- "dev"
2829
- "latest"
2930

@@ -41,7 +42,7 @@ jobs:
4142
VERSION: ${{ matrix.wirecloud-version }}
4243
run: |
4344
docker build --squash -t fiware/wirecloud:${VERSION} .
44-
test "${VERSION}" = "latest" && sed -ri "s|fiware/wirecloud:1.3|fiware/wirecloud:latest|g" docker-compose*.yml || true
45+
test "${VERSION}" = "latest" && sed -ri "s|fiware/wirecloud:1.4|fiware/wirecloud:latest|g" docker-compose*.yml || true
4546
sudo python3 tests.py
4647
- name: Push to docker
4748
env:

1.4/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/elasticsearch-data/
2+
/postgres-data/
3+
/wirecloud-data/
4+
/wirecloud-static/

1.4/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
ARG PYTHON_VERSION=3.8
2+
FROM python:${PYTHON_VERSION}-slim
3+
4+
ENV GITHUB_ACCOUNT=${GITHUB_ACCOUNT} \
5+
GITHUB_REPOSITORY=${GITHUB_REPOSITORY} \
6+
DEFAULT_THEME=wirecloud.defaulttheme \
7+
FORWARDED_ALLOW_IPS=* \
8+
DB_PORT=5432 \
9+
LOGLEVEL=info
10+
11+
# Install WireCloud & dependencies
12+
COPY ./docker-entrypoint.sh /
13+
COPY ./manage.py /usr/local/bin/
14+
15+
RUN apt update && \
16+
apt install -y --no-install-recommends libmemcached-dev libpcre3-dev gosu gcc ca-certificates curl && \
17+
pip install --no-cache-dir social-auth-app-django "gunicorn==19.3.0" "psycopg2-binary<2.9" pylibmc pysolr "elasticsearch==2.4.1" && \
18+
pip install --no-cache-dir "wirecloud<1.5" && \
19+
adduser --system --group --shell /bin/bash wirecloud && \
20+
pip install --no-cache-dir "channels<2.3" "channels-redis" "channels-rabbitmq" "wirecloud-keycloak>=0.3.0" && \
21+
mkdir -p /opt/wirecloud_instance /var/www/static && \
22+
cd /opt && \
23+
wirecloud-admin startproject wirecloud_instance wirecloud_instance && \
24+
chown -R wirecloud:wirecloud wirecloud_instance /var/www/static && \
25+
chmod a+x wirecloud_instance/manage.py && \
26+
chmod a+x /docker-entrypoint.sh && \
27+
apt-get remove -y gcc libmemcached-dev --autoremove && \
28+
rm -rf /var/lib/apt/lists/*
29+
30+
COPY ./settings.py ./urls.py /opt/wirecloud_instance/wirecloud_instance/
31+
32+
WORKDIR /opt/wirecloud_instance
33+
34+
VOLUME /var/www/static
35+
VOLUME /opt/wirecloud_instance/data
36+
37+
HEALTHCHECK --interval=5s \
38+
--start-period=120s \
39+
CMD curl --fail http://localhost:8000/api/features || exit 1
40+
41+
ENTRYPOINT ["/docker-entrypoint.sh"]

1.4/docker-compose-config-file.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
version: "3"
2+
3+
services:
4+
5+
nginx:
6+
restart: always
7+
image: nginx:latest
8+
ports:
9+
- 80:80
10+
volumes:
11+
- ./nginx.conf:/etc/nginx/nginx.conf:ro
12+
- wirecloud-static:/var/www/static:ro
13+
depends_on:
14+
- wirecloud
15+
16+
17+
postgres:
18+
restart: always
19+
image: postgres:latest
20+
environment:
21+
- POSTGRES_PASSWORD=wirepass # Change this password!
22+
volumes:
23+
- postgres-data:/var/lib/postgresql/data
24+
25+
26+
elasticsearch:
27+
restart: always
28+
image: elasticsearch:2.4
29+
volumes:
30+
- elasticsearch-data:/usr/share/elasticsearch/data
31+
command: elasticsearch -Des.index.max_result_window=50000
32+
33+
34+
memcached:
35+
restart: always
36+
image: memcached:1
37+
command: memcached -m 2048m
38+
39+
40+
wirecloud:
41+
restart: always
42+
image: fiware/wirecloud:dev
43+
depends_on:
44+
- postgres
45+
- elasticsearch
46+
- memcached
47+
environment:
48+
- DEBUG=False
49+
# - DEFAULT_THEME=wirecloud.defaulttheme
50+
- DB_HOST=postgres
51+
- DB_PASSWORD=wirepass # Change this password!
52+
- FORWARDED_ALLOW_IPS=*
53+
- ELASTICSEARCH2_URL=http://elasticsearch:9200/
54+
- MEMCACHED_LOCATION=memcached:11211
55+
# Uncomment the following environment variables to enable IDM integration
56+
#- FIWARE_IDM_SERVER=${FIWARE_IDM_SERVER}
57+
#- SOCIAL_AUTH_FIWARE_KEY=${SOCIAL_AUTH_FIWARE_KEY}
58+
#- SOCIAL_AUTH_FIWARE_SECRET=${SOCIAL_AUTH_FIWARE_SECRET}
59+
volumes:
60+
- wirecloud-data:/opt/wirecloud_instance/data
61+
- wirecloud-static:/var/www/static
62+
- ./settings.py:/opt/wirecloud_instance/wirecloud_instance/settings.py:ro
63+
64+
volumes:
65+
elasticsearch-data:
66+
postgres-data:
67+
wirecloud-data:
68+
wirecloud-static:

1.4/docker-compose-custom-user.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: "3"
2+
3+
services:
4+
5+
wirecloud:
6+
restart: always
7+
image: fiware/wirecloud:dev
8+
# If you want to use a user from the host, provide here the id of the
9+
# user, e.g. `export WIRECLOUD_USER=$(id -u username)`
10+
user: ${WIRECLOUD_USER:-0}
11+
ports:
12+
- 80:8000
13+
environment:
14+
- DEBUG=True
15+
volumes:
16+
- ./wirecloud-data:/opt/wirecloud_instance/data
17+
- ./wirecloud-static:/var/www/static

1.4/docker-compose-idm.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
version: "3"
2+
3+
services:
4+
5+
nginx:
6+
restart: always
7+
image: nginx:latest
8+
ports:
9+
- 80:80
10+
volumes:
11+
- ./nginx.conf:/etc/nginx/nginx.conf:ro
12+
- wirecloud-static:/var/www/static:ro
13+
depends_on:
14+
- wirecloud
15+
16+
17+
postgres:
18+
restart: always
19+
image: postgres:latest
20+
environment:
21+
- POSTGRES_PASSWORD=wirepass # Change this password!
22+
volumes:
23+
- postgres-data:/var/lib/postgresql/data
24+
25+
26+
elasticsearch:
27+
restart: always
28+
image: elasticsearch:2.4
29+
volumes:
30+
- elasticsearch-data:/usr/share/elasticsearch/data
31+
command: elasticsearch -Des.index.max_result_window=50000
32+
33+
34+
memcached:
35+
restart: always
36+
image: memcached:1
37+
command: memcached -m 2048m
38+
39+
40+
mysql:
41+
restart: always
42+
image: mysql/mysql-server:5.7.21
43+
environment:
44+
- MYSQL_ROOT_PASSWORD=idm
45+
- MYSQL_ROOT_HOST=%
46+
47+
48+
keyrock:
49+
restart: always
50+
image: fiware/idm:7.0.2
51+
ports:
52+
- 3000:3000
53+
environment:
54+
- DATABASE_HOST=mysql
55+
56+
57+
wirecloud:
58+
restart: always
59+
image: fiware/wirecloud:dev
60+
depends_on:
61+
- postgres
62+
- elasticsearch
63+
- memcached
64+
environment:
65+
- DEBUG=False
66+
# - DEFAULT_THEME=wirecloud.defaulttheme
67+
- DB_HOST=postgres
68+
- DB_PASSWORD=wirepass # Change this password!
69+
- FORWARDED_ALLOW_IPS=*
70+
- ELASTICSEARCH2_URL=http://elasticsearch:9200/
71+
- MEMCACHED_LOCATION=memcached:11211
72+
- FIWARE_IDM_SERVER=${FIWARE_IDM_SERVER}
73+
- SOCIAL_AUTH_FIWARE_KEY=${SOCIAL_AUTH_FIWARE_KEY}
74+
- SOCIAL_AUTH_FIWARE_SECRET=${SOCIAL_AUTH_FIWARE_SECRET}
75+
volumes:
76+
- wirecloud-data:/opt/wirecloud_instance/data
77+
- wirecloud-static:/var/www/static
78+
79+
volumes:
80+
elasticsearch-data:
81+
postgres-data:
82+
wirecloud-data:
83+
wirecloud-static:

1.4/docker-compose-simple.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "3"
2+
3+
services:
4+
5+
nginx:
6+
restart: always
7+
image: nginx:latest
8+
ports:
9+
- 80:80
10+
volumes:
11+
- ./nginx.conf:/etc/nginx/nginx.conf:ro
12+
- wirecloud-static:/var/www/static:ro
13+
depends_on:
14+
- wirecloud
15+
16+
17+
wirecloud:
18+
restart: always
19+
image: fiware/wirecloud:dev
20+
environment:
21+
- DEBUG=False
22+
- FORWARDED_ALLOW_IPS=*
23+
volumes:
24+
- wirecloud-data:/opt/wirecloud_instance/data
25+
- wirecloud-static:/var/www/static
26+
27+
volumes:
28+
wirecloud-data:
29+
wirecloud-static:

1.4/docker-compose-standalone.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "3"
2+
3+
services:
4+
5+
wirecloud:
6+
restart: always
7+
image: fiware/wirecloud:dev
8+
ports:
9+
- 80:8000
10+
environment:
11+
- DEBUG=True
12+
volumes:
13+
- wirecloud-data:/opt/wirecloud_instance/data
14+
- wirecloud-static:/var/www/static
15+
16+
volumes:
17+
wirecloud-data:
18+
wirecloud-static:

1.4/docker-compose.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
version: "3"
2+
3+
services:
4+
5+
nginx:
6+
restart: always
7+
image: nginx:latest
8+
ports:
9+
- 80:80
10+
volumes:
11+
- ./nginx.conf:/etc/nginx/nginx.conf:ro
12+
- wirecloud-static:/var/www/static:ro
13+
depends_on:
14+
- wirecloud
15+
16+
17+
postgres:
18+
restart: always
19+
image: postgres:latest
20+
environment:
21+
- POSTGRES_PASSWORD=wirepass # Change this password!
22+
volumes:
23+
- postgres-data:/var/lib/postgresql/data
24+
25+
26+
elasticsearch:
27+
restart: always
28+
image: elasticsearch:2.4
29+
volumes:
30+
- elasticsearch-data:/usr/share/elasticsearch/data
31+
command: elasticsearch -Des.index.max_result_window=50000
32+
33+
34+
memcached:
35+
restart: always
36+
image: memcached:1
37+
command: memcached -m 2048m
38+
39+
40+
wirecloud:
41+
restart: always
42+
image: fiware/wirecloud:dev
43+
depends_on:
44+
- postgres
45+
- elasticsearch
46+
- memcached
47+
environment:
48+
- DEBUG=False
49+
- LOGLEVEL=INFO
50+
# - DEFAULT_THEME=wirecloud.defaulttheme
51+
- DB_HOST=postgres
52+
- DB_PASSWORD=wirepass # Change this password!
53+
- FORWARDED_ALLOW_IPS=*
54+
- ELASTICSEARCH2_URL=http://elasticsearch:9200/
55+
- MEMCACHED_LOCATION=memcached:11211
56+
# Uncomment the following environment variables to enable FIWARE IDM integration
57+
#- FIWARE_IDM_SERVER=${FIWARE_IDM_SERVER}
58+
#- SOCIAL_AUTH_FIWARE_KEY=${SOCIAL_AUTH_FIWARE_KEY}
59+
#- SOCIAL_AUTH_FIWARE_SECRET=${SOCIAL_AUTH_FIWARE_SECRET}
60+
# Uncomment the following environment variables to enable Keycloak IDM Integration
61+
#- KEYCLOAK_IDM_SERVER=${KEYCLOAK_IDM_SERVER}
62+
#- KEYCLOAK_REALM=${KEYCLOAK_REALM}
63+
#- KEYCLOAK_KEY=${KEYCLOAK_KEY}
64+
#- KEYCLOAK_GLOBAL_ROLE=${KEYCLOAK_GLOBAL_ROLE}
65+
#- SOCIAL_AUTH_KEYCLOAK_KEY=${SOCIAL_AUTH_KEYCLOAK_KEY}
66+
#- SOCIAL_AUTH_KEYCLOAK_SECRET=${SOCIAL_AUTH_KEYCLOAK_SECRET}
67+
volumes:
68+
- wirecloud-data:/opt/wirecloud_instance/data
69+
- wirecloud-static:/var/www/static
70+
71+
volumes:
72+
elasticsearch-data:
73+
postgres-data:
74+
wirecloud-data:
75+
wirecloud-static:

0 commit comments

Comments
 (0)