Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support backend-only development mode (#1327) #1339

Merged
merged 3 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ services:
extensions-all-jvm:
labels:
org.apache.streampipes.dev.extensions-all-jvm.service.description: "Dev extensions-all-jvm service"
# ports:
# - "8098:8090"
ports:
- "8090:8090"
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ services:
image: ${SP_DOCKER_REGISTRY}/extensions-all-jvm:${SP_VERSION}
depends_on:
- consul
- backend
- couchdb
volumes:
- files:/spImages
# Set SP_HOST to an IP or hostname that can be resolved from the Docker container and local-running backend
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we cleanup this comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the comment and will add the info to the documentation, thanks!

# environment:
# - SP_HOST=host.docker.internal
logging:
driver: "json-file"
options:
Expand Down
47 changes: 47 additions & 0 deletions installer/cli/deploy/standalone/ui-custom-conf/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

server {
listen 80 default_server;
resolver 127.0.0.11;

root /usr/share/nginx/html;

# Enable gzip compression
gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;

# StreamPipes

location /streampipes-backend {

# When running the backend locally and the UI in Docker, change the upstream to an IP resolvable from within Docker
set $upstream host.docker.internal:8030;

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://$upstream;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: "3.4"
services:
ui-custom-conf:
labels:
org.apache.streampipes.dev.ui.service.description: "Dev UI service"
37 changes: 37 additions & 0 deletions installer/cli/deploy/standalone/ui-custom-conf/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: "3.4"
services:
ui-custom-conf:
image: ${SP_DOCKER_REGISTRY}/ui:${SP_VERSION}
ports:
- "80:80"
depends_on:
- couchdb
- consul
volumes:
- "../ui-custom-conf/default.conf:/etc/nginx/conf.d/default.conf"
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
networks:
spnet:

networks:
spnet:
external: true
3 changes: 1 addition & 2 deletions installer/cli/environments/backend
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ consul
zookeeper
couchdb
influxdb
extensions-all-jvm
ui
ui-custom-conf
3 changes: 1 addition & 2 deletions installer/cli/environments/backend-nats
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ consul
couchdb
influxdb
nats
extensions-all-jvm
ui
ui-custom-conf