Skip to content

Instantly share code, notes, and snippets.

@nickdbush
Last active March 14, 2024 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickdbush/95d8dfee0fa49d8b4635ceac2d264a9d to your computer and use it in GitHub Desktop.
Save nickdbush/95d8dfee0fa49d8b4635ceac2d264a9d to your computer and use it in GitHub Desktop.
Superdesk installation instructions (Docker)

Archive only

I haven't looked at Superdesk in close to two years now (I no longer work at Sourcefabric) and I have little to no recollection of how to set it up. I'm leaving this gist online mainly for archival reasons and because there's a lot of useful information in the comments that I don't want to disappear from the internet. I hope you get it up and running one way or another, and if you do, please pop your solution here/make a new gist and link it here for others!

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"
@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

@SKJoy
Copy link

SKJoy commented Sep 12, 2023

SuperDesk always creating URLs with localhost! Browser Network tab shows it is trying to fetch http://localhost:8080/api/client_config. I have set the ENVIRONMENT variables as bellow but still no help :( Trying to host it under a domain using NginX reverse proxy.

Server

Client

Why does documents have to be so obscure always :(

@trondhuso
Copy link

trondhuso commented Nov 7, 2023

Problem: Running the docker-compose up command and when done it says: ERROR: Cannot locate specified Dockerfile: Dockerfile

There is no specified Dockerfile.

Any guidance welcome.

Solved this myself. The reason was that there were no dockerfile in the folder. I cloned the repo and ran the docker command.
Got much longer, but there are still issues which stops the installation....

@trondhuso
Copy link

@nickdbush - I have a gut feeling the package is some sort of broken. The install stops at build when running the tsc tests. According to online search this may be because of outdated ts.

@Saied-A
Copy link

Saied-A commented Mar 12, 2024

@nickdbush -Need Assistance with Superdesk User Verification Emails
Hi Nick,
I hope this message finds you well.
I've been using Superdesk and find it incredibly useful for my projects. However, I've encountered an issue that I'm hoping you can assist me with.
I'm currently facing an issue with user verification emails not being sent out when creating new users. I've configured the email settings in the docker-compose.yml file as per the documentation, but I'm still unable to receive the verification token on the specified email addresses, be it Gmail or my local mail server 'tbsuperdesk.org'.
As a result, all newly created users remain in a 'Pending' state, and I'm unable to activate them.
I've tried various troubleshooting steps, including restarting the Docker containers and ensuring that the email settings are correctly configured, but to no avail.
Could you please provide some guidance or insights into resolving this issue? Any assistance you could offer would be greatly appreciated.
Thank you in advance for your help.
Best regards,
Saied Ashton

@nickdbush
Copy link
Author

nickdbush commented Mar 12, 2024

@trondhuso @Saied-A I haven't looked at Superdesk in close to two years now (I no longer work at Sourcefabric) and I have little to no recollection of how to set it up. I'm leaving this gist online mainly for archival reasons and because there's a lot of useful information in the comments that I don't want to disappear from the internet. I hope you get it up and running one way or another, and if you do, please pop your solution here/make a new gist and link it here for others!

@Saied-A
Copy link

Saied-A commented Mar 13, 2024

@nickdbush Thank you for your quick response and for maintaining the gist for archival purposes. Your dedication to preserving resources is greatly appreciated. I'll continue working on resolving the user verification email issue and will share any solution I find in the comments, or a new gist as suggested.

@trondhuso
Copy link

I did set up a superdesk a few months back for myself - and to fresh up on knowledge.
Superdesk / sourcefabric has a docker install now that works much better than running the old stuff.

sorry to hear that you are no longer at sourcefabric, Nick.

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