GitLab deployment needing two different mount paths
josh-complex
PROOP

2 months ago

I'm wondering if we could get some help going about trying to spin up a GitLab deployment in Railway. GitLab needs two different mount paths (/etc/gitlab for config, /var/*/gitlab for logs and user&repo data).

I'm not sure what the best way to go about doing this on Railway would be given that we can only mount a single volume.

https://docs.gitlab.com/install/docker/configuration/

cc @Yasahiro

image.png

Attachments

20 Replies

oliverbooth
PRO

2 months ago

Technically three* mount points (unless we just want to mount /var, which would be kind of insane)

Template repo: https://github.com/vergissberlin/railwayapp-gitlab


josh-complex
PROOP

2 months ago

@vergissberlin Apologies for the ping, but if you have any advice here as well, that would be incredible.


2 months ago

Railway only supports one mount point per volume right now:

Read more on caveats here


2 months ago

The logs and config folder probably don't need to be mounted though!


josh-complex
PROOP

2 months ago

@Mykal can we deploy from a repo's compose that manually sets up the additional volumes?


josh-complex
PROOP

2 months ago

We'd need to store the config though 🤔


josh-complex
PROOP

2 months ago

The logs I agree with, but I'm not sure how else to have gitlab read persisted config


2 months ago

Got an idea- let me type it up for you


2 months ago

could you do something like:

 
FROM gitlab/gitlab-ce: 

# copy over config (would need to check out what config looks like)
COPY config /etc/gitlab

and then have railway use that dockerfile?


2 months ago

A little more boilerplate but then you have version control around config too (may be desirable for you depending on your usecase)


josh-complex
PROOP

2 months ago

Ah that would be pretty clean yes


josh-complex
PROOP

2 months ago

And we'd fall back on the repo as the source for the config


josh-complex
PROOP

2 months ago

Makes sense thank you 🙂


2 months ago

Yessir!


2 months ago

I have done similar things for a few of my templates 🙂


2 months ago

so yeah would try

  1. start up container locally with volume mount, pull out default config into your repo and push it
  2. writeup the dockerfile above and push it as part of the repo
  3. point railway at your dockerfile
  4. volume mount the /var/opt/gitlab folder for data persistence
  5. follow gitlab setup steps
  6. redeploy / restart and check if data is persisted 🙂

2 months ago

lmk if you run into any issues- best of luck <:salute:1137099685417451530>


josh-complex
PROOP

2 months ago

@Mykal This worked well by the way! Thank you for your assistance 🙂

For future reference, is there a technical limitation to why Railway doesn't support multiple mount points or multiple volumes? Or is it just planned work that hasn't been picked up yet?


2 months ago

Hey! really glad to hear that worked for you


2 months ago

Can't speak to the technical limitations; but I know it's been talked about for years so I am sure it's on the teams radar.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...