How to deploy a Discourse forum in Railway through their docker image?

Discourse is a forum software that can be deployed via a docker image: https://hub.docker.com/r/discourse/base I tried using this URL directly in Railway "New > Docker Image" option, but the URL is replaced by https://hub.docker.com/_/discourse — so I copied their base image folder contents (which includes the Dockerfile): https://github.com/discourse/discourse_docker/tree/master/image/base To a new repo and added a Postgres and Redis service in the project. The deployment fails with:
59 | ADD install-nginx /tmp/install-nginx 60 | >>> RUN /tmp/install-nginx 61 | 62 | RUN apt -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng ------------------- ERROR: failed to solve: process "/bin/sh -c /tmp/install-nginx" did not complete successfully: exit code: 2
Does what I am attempting have any chance of working? Project ID: eb420912-7d00-4c05-8b5a-85b0415e95f4
Discourse by Discourse, Inc. | Docker Hub
Discourse is the 100% open source discussion platform built for the next decade of the Internet.
GitHub
discourse_docker/image/base at master · discourse/discourse_docker
A Docker image for Discourse. Contribute to discourse/discourse_docker development by creating an account on GitHub.
7 Replies
Percy
Percy14mo ago
Project ID: eb420912-7d00-4c05-8b5a-85b0415e95f4
Brody
Brody14mo ago
in the case of discourse to add its docker image to a service you would input discourse/base:release into the input field when prompt to select an image, for a pre-existing service, you can do this by going into the settings under the source section
GameAchievements
GameAchievements14mo ago
Thank you @Brody , discourse/base:release did work for the image name, it's deployed! Would there be a way now to run ./discourse-setup on that image, according to this guide: https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#6-edit-discourse-configuration
GitHub
discourse/docs/INSTALL-cloud.md at main · discourse/discourse
A platform for community discussion. Free, open, simple. - discourse/discourse
Brody
Brody14mo ago
id say youd want to run that command locally through the railway cli
GameAchievements
GameAchievements14mo ago
thanks again @brody192 , I connected to the project's service through the railway CLI on a local clone of discourse_docker repo and ran: railway run sudo ./discourse-setup (sudo was needed) The result was:
Password: ./discourse-setup: line 149: free: command not found ./discourse-setup: line 180: [: : integer expression expected ./discourse-setup: line 189: [: : integer expression expected Ports 80 and 443 are free for use samples/standalone.yml -> containers/app.yml ./discourse-setup: line 149: free: command not found Found GB of memory and 8 physical CPU cores ./discourse-setup: line 260: [: : integer expression expected ./discourse-setup: line 264: [: : integer expression expected ./discourse-setup: line 268: 256 * : syntax error: operand expected (error token is " ") Hostname for your Discourse? [discourse.example.com]:
I guess there are some issues, but the prompt for generating the yml shows up. I confirmed enough for now, thank you for reaching out!
Brody
Brody14mo ago
you would need to have a local install of discourse and all of its cli tools, since railway run runs the command locally but with the railway service variables available
Nacho Codoñer
Nacho Codoñer7mo ago
Did you manage to install your Discourse forum in Railway service?
Want results from more Discord servers?
Add your server