-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy docker setup from superdesk repo
- Loading branch information
Showing
31 changed files
with
190 additions
and
623 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/node_modules | ||
**/dist | ||
**/package-lock.json | ||
data |
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,25 @@ | ||
# BUILD | ||
FROM node:12 AS build | ||
|
||
# install client | ||
WORKDIR /tmp/client | ||
COPY . . | ||
RUN npm install --no-audit --unsafe-perm | ||
RUN npm run build | ||
|
||
# DEPLOY | ||
FROM nginx | ||
|
||
# setup the environment | ||
WORKDIR /opt/superdesk/client/dist | ||
|
||
# build client | ||
COPY --from=build /tmp/client/dist ./ | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY ./docker/nginx.conf /etc/nginx/nginx.conf | ||
COPY ./docker/superdesk_vhost.conf /etc/nginx/sites-enabled/superdesk.conf | ||
COPY ./docker/start.sh /opt/superdesk/start.sh | ||
|
||
ENTRYPOINT [ "/opt/superdesk/start.sh" ] | ||
CMD ["nginx", "-g daemon off;"] |
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 |
---|---|---|
|
@@ -68,6 +68,4 @@ http { | |
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-enabled/*; | ||
} | ||
|
||
daemon off; | ||
} |
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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
#!/bin/bash | ||
cd /opt/superdesk/client/dist && | ||
set -e | ||
|
||
cd /opt/superdesk/client/dist | ||
|
||
# replace default client config with env vars | ||
sed -i \ | ||
-e "s/http:\/\/localhost:5000\/api/$(echo $SUPERDESK_URL | sed 's/\//\\\//g')/g" \ | ||
-e "s/ws:\/\/localhost:5100/$(echo $SUPERDESK_WS_URL | sed 's/\//\\\//g')/g" \ | ||
-e "s/ws:\/\/0.0.0.0:5100/$(echo $SUPERDESK_WS_URL | sed 's/\//\\\//g')/g" \ | ||
-e 's/iframely:{key:""}/iframely:{key:"'$IFRAMELY_KEY'"}/g' \ | ||
app*.js && | ||
nginx & | ||
app*.js | ||
|
||
which nginx | ||
|
||
cd /opt/superdesk && sleep 5 && bash honcho start | ||
exec "$@" |
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
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,64 @@ | ||
version: "3.2" | ||
services: | ||
|
||
mongodb: | ||
image: mongo:4 | ||
networks: | ||
- superdesk | ||
|
||
redis: | ||
image: redis:3 | ||
networks: | ||
- superdesk | ||
|
||
elastic: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1 | ||
environment: | ||
- discovery.type=single-node | ||
networks: | ||
- superdesk | ||
|
||
superdesk-server: | ||
build: ./server | ||
depends_on: | ||
- redis | ||
- mongodb | ||
- elastic | ||
environment: | ||
- SUPERDESK_URL=http://localhost:8080/api | ||
- DEMO_DATA=1 # install demo data, set to 0 if you want clean install | ||
- WEB_CONCURRENCY=2 | ||
- SUPERDESK_CLIENT_URL=http://localhost:8080 | ||
- CONTENTAPI_URL=http://localhost:8080/capi | ||
- MONGO_URI=mongodb://mongodb/superdesk | ||
- CONTENTAPI_MONGO_URI=mongodb://mongodb/superdesk_capi | ||
- PUBLICAPI_MONGO_URI=mongodb://mongodb/superdesk_papi | ||
- LEGAL_ARCHIVE_URI=mongodb://mongodb/superdesk_legal | ||
- ARCHIVED_URI=mongodb://mongodb/superdesk_archive | ||
- ELASTICSEARCH_URL=http://elastic:9200 | ||
- ELASTICSEARCH_INDEX=superdesk | ||
- CELERY_BROKER_URL=redis://redis:6379/1 | ||
- REDIS_URL=redis://redis:6379/1 | ||
- DEFAULT_TIMEZONE=Europe/Prague | ||
- SECRET_KEY=secretkey | ||
# More configuration options can be found at https://superdesk.readthedocs.io/en/latest/settings.html | ||
networks: | ||
- superdesk | ||
|
||
superdesk-client: | ||
build: ./client | ||
environment: | ||
# If not hosting on localhost, change these lines | ||
- SUPERDESK_URL=http://localhost:8080/api | ||
- SUPERDESK_WS_URL=ws://localhost:8080/ws | ||
- IFRAMELY_KEY | ||
depends_on: | ||
- superdesk-server | ||
ports: | ||
- "8080:80" | ||
networks: | ||
- superdesk | ||
|
||
networks: | ||
superdesk: | ||
driver: bridge |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.