Skip to content

Instantly share code, notes, and snippets.

@nickdbush
Last active February 12, 2022 15:20
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
Copy link
Author

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
Copy link

kennk commented Feb 3, 2021

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

@oguruma1218
Copy link

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
Copy link

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
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link

@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
Copy link

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
Copy link
Author

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
Copy link

@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
Copy link

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?

@DanicoSantos
Copy link

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?

You should change localhost to your hostname on the docker-compose.yml file

@nerocil
Copy link

nerocil commented Sep 22, 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?

You should change localhost to your hostname on the docker-compose.yml file

Thank you I had similar problem after change to localhost to server IP its works

@ciclanoio
Copy link

exactly @nerocil , in my case I was testing with Digital Ocean, and I had the same problem. With your tip, I removed from localhost to the server's external IP and that's it. The login page opened correctly

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