-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update demo httpd and add deployment docs
- Loading branch information
1 parent
3c493da
commit f53fe33
Showing
5 changed files
with
476 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,7 @@ LoadModule proxy_http_module modules/mod_proxy_http.so | |
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so | ||
#LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so | ||
#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so | ||
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so | ||
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so | ||
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so | ||
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so | ||
#LoadModule proxy_express_module modules/mod_proxy_express.so | ||
|
@@ -196,7 +196,7 @@ LoadModule dir_module modules/mod_dir.so | |
#LoadModule speling_module modules/mod_speling.so | ||
#LoadModule userdir_module modules/mod_userdir.so | ||
LoadModule alias_module modules/mod_alias.so | ||
LoadModule rewrite_module modules/mod_rewrite.so | ||
#LoadModule rewrite_module modules/mod_rewrite.so | ||
|
||
<IfModule unixd_module> | ||
# | ||
|
@@ -238,7 +238,7 @@ ServerAdmin [email protected] | |
# | ||
# If your host doesn't have a registered DNS name, enter its IP address here. | ||
# | ||
ServerName localhost:8080 | ||
#ServerName www.example.com:80 | ||
|
||
# | ||
# Deny access to the entirety of your server's filesystem. You must | ||
|
@@ -549,11 +549,5 @@ SSLRandomSeed startup builtin | |
SSLRandomSeed connect builtin | ||
</IfModule> | ||
|
||
<VirtualHost *:80> | ||
RewriteEngine on | ||
|
||
RewriteCond %{DOCUMENT_ROOT}/$1 !-f | ||
RewriteCond %{DOCUMENT_ROOT}/$1 !-d | ||
RewriteRule ^/(.*)$ http://apollo-collaboration-server:3999/$1 [P,QSA] | ||
ProxyPassReverse / http://apollo-collaboration-server:3999/ | ||
</VirtualHost> | ||
ProxyPassMatch "^/apollo/(.*)$" "http://apollo-collaboration-server:3999/$1" upgrade=websocket connectiontimeout=3600 timeout=3600 | ||
ProxyPassReverse "/apollo/" "http://apollo-collaboration-server:3999/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
FROM httpd:alpine | ||
ARG JBROWSE_VERSION | ||
ARG APOLLO_VERSION | ||
ARG FORWARD_HOSTNAME | ||
ARG FORWARD_PORT | ||
ARG URL | ||
COPY <<EOF /usr/local/apache2/conf/httpd.conf.append | ||
LoadModule proxy_module modules/mod_proxy.so | ||
LoadModule proxy_http_module modules/mod_proxy_http.so | ||
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so | ||
ServerName localhost | ||
|
||
ProxyPassMatch "^/apollo/(.*)$" "http://${FORWARD_HOSTNAME}:${FORWARD_PORT}/\$1" upgrade=websocket connectiontimeout=3600 timeout=3600 | ||
ProxyPassReverse "/apollo/" "http://${FORWARD_HOSTNAME}:${FORWARD_PORT}/" | ||
EOF | ||
COPY <<EOF /usr/local/apache2/htdocs/config.json | ||
{ | ||
"configuration": { | ||
"theme": { | ||
"palette": { | ||
"primary": { | ||
"main": "#24264a" | ||
}, | ||
"secondary": { | ||
"main": "#6f8fa2" | ||
}, | ||
"tertiary": { | ||
"main": "#1e4b34" | ||
}, | ||
"quaternary": { | ||
"main": "#6b4e2b" | ||
} | ||
} | ||
} | ||
}, | ||
"plugins": [ | ||
{ | ||
"name": "Apollo", | ||
"url": "/jbrowse-plugin-apollo.umd.production.min.js" | ||
} | ||
], | ||
"internetAccounts": [ | ||
{ | ||
"type": "ApolloInternetAccount", | ||
"internetAccountId": "apolloInternetAccount", | ||
"name": "My Apollo Server", | ||
"description": "A server for my annotations", | ||
"domains": [ | ||
"${URL}" | ||
], | ||
"baseURL": "${URL}/apollo/" | ||
} | ||
], | ||
"defaultSession": { | ||
"name": "Apollo Demo", | ||
"views": [ | ||
{ | ||
"type": "LinearGenomeView" | ||
} | ||
] | ||
} | ||
} | ||
EOF | ||
WORKDIR /usr/local/apache2/htdocs/ | ||
RUN <<EOF | ||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
cat /usr/local/apache2/conf/httpd.conf.append >> /usr/local/apache2/conf/httpd.conf | ||
wget https://github.com/GMOD/jbrowse-components/releases/download/v$JBROWSE_VERSION/jbrowse-web-v$JBROWSE_VERSION.zip | ||
unzip -o jbrowse-web-v$JBROWSE_VERSION.zip | ||
rm jbrowse-web-v$JBROWSE_VERSION.zip | ||
wget --output-document=- --quiet https://registry.npmjs.org/@apollo-annotation/jbrowse-plugin-apollo/-/jbrowse-plugin-apollo-$APOLLO_VERSION.tgz | \ | ||
tar --extract --gzip --file=- --strip=2 package/dist/jbrowse-plugin-apollo.umd.production.min.js | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: apollo-demo-site | ||
|
||
services: | ||
apollo-collaboration-server: | ||
image: ghcr.io/gmod/apollo-collaboration-server | ||
depends_on: | ||
mongo-node-1: | ||
condition: service_healthy | ||
env_file: .env | ||
environment: | ||
MONGODB_URI: mongodb://mongo-node-1:27017,mongo-node-2:27018/apolloDb?replicaSet=rs0 | ||
FILE_UPLOAD_FOLDER: /data/uploads | ||
ALLOW_GUEST_USER: true | ||
GUEST_USER_ROLE: admin | ||
URL: http://localhost | ||
JWT_SECRET: change_this_value | ||
SESSION_SECRET: change_this_value | ||
ports: | ||
- 3999:3999 | ||
volumes: | ||
- uploaded-files-volume:/data/uploads | ||
|
||
client: | ||
build: | ||
args: | ||
APOLLO_VERSION: 0.1.16 | ||
JBROWSE_VERSION: 2.11.2 | ||
FORWARD_HOSTNAME: apollo-collaboration-server | ||
FORWARD_PORT: 3999 | ||
URL: http://localhost | ||
context: . | ||
depends_on: | ||
- apollo-collaboration-server | ||
ports: | ||
- '80:80' | ||
|
||
mongo-node-1: | ||
image: mongo:7 | ||
command: | ||
- '--replSet' | ||
- rs0 | ||
- '--bind_ip_all' | ||
- '--port' | ||
- '27017' | ||
healthcheck: | ||
interval: 30s | ||
retries: 3 | ||
start_interval: 5s | ||
start_period: 2m | ||
test: | | ||
mongosh --port 27017 --quiet --eval " | ||
try { | ||
rs.status() | ||
console.log('replica set ok') | ||
} catch { | ||
rs.initiate({ | ||
_id: 'rs0', | ||
members: [ | ||
{ _id: 0, host: 'mongo-node-1:27017', priority: 1 }, | ||
{ _id: 1, host: 'mongo-node-2:27018', priority: 0.5 }, | ||
], | ||
}) | ||
console.log('replica set initiated') | ||
} | ||
" | ||
timeout: 10s | ||
ports: | ||
- '27017:27017' | ||
volumes: | ||
- mongo-node-1_data:/data/db | ||
- mongo-node-1_config:/data/configdb | ||
|
||
mongo-node-2: | ||
image: mongo:7 | ||
command: | ||
- '--replSet' | ||
- rs0 | ||
- '--bind_ip_all' | ||
- '--port' | ||
- '27018' | ||
ports: | ||
- '27018:27018' | ||
volumes: | ||
- mongo-node-2_data:/data/db | ||
- mongo-node-2_config:/data/configdb | ||
|
||
volumes: | ||
mongo-node-1_config: null | ||
mongo-node-1_data: null | ||
mongo-node-2_config: null | ||
mongo-node-2_data: null | ||
uploaded-files-volume: null |
Oops, something went wrong.