Skip to content

Instantly share code, notes, and snippets.

@nickdbush

nickdbush/README.md

Last active Feb 20, 2021
Embed
What would you like to do?
Superdesk Docker install instructions

How to install Superdesk using Docker

  1. Install Docker
  2. Copy and paste docker-compose.yml in this gist into a blank folder (call it something like superdesk/)
  3. Open the folder in a terminal
  4. Run docker-compose up
  5. Wait a few seconds...
  6. Navigate to localhost:8080

You should see the Superdesk login screen! Now to initialise some data:

  1. Open a new terminal in the same folder
  2. Run docker-compose run superdesk-server run python manage.py app:initialize_data to populate Superdesk with some starting data.
  3. Run docker-compose run superdesk-server run python manage.py users:create -u admin -p admin -e admin@localhost --admin to create an example administrator.
version: "3"
services:
mongo:
image: mongo:3
expose:
- "27017"
redis:
image: redis:3
expose:
- "6379"
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
environment:
- xpack.security.enabled=false
- discovery.type=single-node
expose:
- "9200"
- "9300"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
superdesk-server:
image: nickdbush/superdesk-server:2.0
container_name: superdesk-server
depends_on:
- redis
- mongo
- elastic
environment:
- WEB_CONCURRENCY=2
- SUPERDESK_CLIENT_URL=http://localhost:8080
- GRAMMALECTE_URL=http://grammalecte:9999
- MONGO_URI=mongodb://mongo/test
- PUBLICAPI_MONGO_URI=mongodb://mongo/test_pa
- LEGAL_ARCHIVE_URI=mongodb://mongo/test_la
- ARCHIVED_URI=mongodb://mongo/test_ar
- ELASTICSEARCH_URL=http://elastic:9200
- ELASTICSEARCH_INDEX=superdesk
- CELERY_BROKER_URL=redis://redis:6379/1
- REDIS_URL=redis://redis:6379/1
- AMAZON_ACCESS_KEY_ID
- AMAZON_CONTAINER_NAME
- AMAZON_REGION
- AMAZON_SECRET_ACCESS_KEY
- REUTERS_USERNAME
- REUTERS_PASSWORD
# - MAIL_SERVER=example.com
# - MAIL_PORT=25
# - MAIL_USE_TLS=false
# - MAIL_USE_SSL=false
# - MAIL_USERNAME=user
# - MAIL_PASSWORD=pwd
- SENTRY_DSN
- SECRET_KEY
- CONTENTAPI_URL=http://localhost:8080/capi
- CONTENTAPI_MONGO_URI=mongodb://mongo/test_ca
superdesk-client:
image: nickdbush/superdesk-client:2.0
container_name: superdesk
environment:
- SUPERDESK_URL=http://localhost:8080/api
- SUPERDESK_WS_URL=ws://localhost:8080/ws
- VIEW_DATE_FORMAT
- VIEW_TIME_FORMAT
- IFRAMELY_KEY
depends_on:
- superdesk-server
ports:
- "8080:80"
@nickdbush

This comment has been minimized.

Copy link
Owner Author

@nickdbush nickdbush commented Dec 13, 2020

To server over HTTPS, make sure the SUPERDESK_CLIENT_URL and SUPERDESK_URL parameters reflect the origin you are hosting from, including the https:// part. You must also make sure that SUPERDESK_WS_URL uses the wss:// websocket secure protocol.

@kennk

This comment has been minimized.

Copy link

@kennk kennk commented Feb 2, 2021

Excellent docker compose yml for superdesk. Had no problem running this. Is there a similar script for publisher? Thanks for this example.

@nickdbush

This comment has been minimized.

Copy link
Owner Author

@nickdbush nickdbush commented Feb 2, 2021

Had no problem running this.

That's great to hear @kennk! The official Docker images should be coming out this week and I'll drop a message here with their new home on Docker Hub.

Is there a similar script for publisher?

Not currently. We're working to sort our the full installation process for Superdesk first, and the docs needed to go along with it. I can't give you an ETA for Publisher or any guarantees yet, sorry.

@kennk

This comment has been minimized.

Copy link

@kennk kennk commented Feb 3, 2021

Thanks again. I ran it on a thinkpad x140e. Will wait for your next full install.

@oguruma1218

This comment has been minimized.

Copy link

@oguruma1218 oguruma1218 commented Feb 19, 2021

I've installed this on a Ubuntu 20.04 LTS VPS per the Docker instructions. IP:8080 gives me a blank page, though I do see the Superdesk logo in the tab.

I'm new to both Docker and Superdesk, so I am sure I am doing something wrong. Any ideas?

@kennk

This comment has been minimized.

Copy link

@kennk kennk commented Feb 19, 2021

My wild guess is - if the VPS is hosted by someone else, is it correctly configured to point the browser to the superdesk page without issues? I used a laptop - with docker installed - to run this script with nothing to report. I think if you provide more details, someone can help. ps: "IP:8080"? Hope you mean a real ip address as in xxx.xxx.xxx.xxx then :8080? Just to be sure.

@oguruma1218

This comment has been minimized.

Copy link

@oguruma1218 oguruma1218 commented Feb 19, 2021

The VPS is installed on a KVM (in a DMZ) on my LAN. I'm not sure what details to provide... That's sort of my conundrum here.... I'm not even sure where to start... All I can say is that I installed it using the instructions into a completely Vanilla Ubuntu VPS. I'd assume that the Docker install would take care of the webserver configuration. I do know that I can see the Superdesk Favicon in the browser tab when I go to 10.1.1.6:8080 (the actual IP of the Superdesk Install). Other than that it's a blank page (but no 503/404 error).

@nickdbush

This comment has been minimized.

Copy link
Owner Author

@nickdbush nickdbush commented Feb 19, 2021

Hi @oguruma1218, can you open DevTools and see if there are any errors logged to the javascript console? Sounds like it could be a problem loading the client application.

Also, it's worth noting that there are now official containers released, so you'll want to update your docker-compose file to sourcefabricoss/superdesk-server:latest and sourcefabricoss/superdesk-client:latest (you can find the containers in the sourcefabricoss user).

@nickdbush

This comment has been minimized.

Copy link
Owner Author

@nickdbush nickdbush commented Feb 19, 2021

Also, for people trying to set this up, I've made a first attempt at trying to centralise some docs for you: https://superdesk-docs.netlify.app/. I'm adding to it all the time, so if there's something there that you can't find and need, or spot any issues, please email me at nicholas.bush@sourcefabric.org

@oguruma1218

This comment has been minimized.

Copy link

@oguruma1218 oguruma1218 commented Feb 19, 2021

@nickdbush one thing I am missing is why the documentation calls for navigating to localhost:8080. Other than playing around with it, why would a person install this on their client machine (presumably a laptop or workstaiton)?

@kennk

This comment has been minimized.

Copy link

@kennk kennk commented Feb 19, 2021

@nickdbush one thing I am missing is why the documentation calls for navigating to localhost:8080. Other than playing around with it, why would a person install this on their client machine (presumably a laptop or workstaiton)?

For me => test before use

@nickdbush

This comment has been minimized.

Copy link
Owner Author

@nickdbush nickdbush commented Feb 19, 2021

To echo @kennk, the original instructions are designed for users to install to start tinkering with the project, they are not intended to be production deployment instructions or advice.

@oguruma1218

This comment has been minimized.

Copy link

@oguruma1218 oguruma1218 commented Feb 20, 2021

@nickdbush do you have a lot of (non-supported) installs in the wild? I have a class full of journalism students that I would love to roll this out out for soon. We don't need enterprise-grade support, by any means, but something reasonably stable (and free, given our basically non-existent budget) would be a great tool for the students to learn how to use.

@oguruma1218

This comment has been minimized.

Copy link

@oguruma1218 oguruma1218 commented Feb 20, 2021

Hi @oguruma1218, can you open DevTools and see if there are any errors logged to the javascript console? Sounds like it could be a problem loading the client application.

Also, it's worth noting that there are now official containers released, so you'll want to update your docker-compose file to sourcefabricoss/superdesk-server:latest and sourcefabricoss/superdesk-client:latest (you can find the containers in the sourcefabricoss user).

It does look like I am getting console errors, specifically, connection refused. Digging through the .yaml file, I'm assuming the webserver is just configured to listen on 127.0.0.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment