ZeroxAdvanced
Private network setup help
Hi all hope someone can help us. Sofar loving Railway!
We have a Django application that we want to use as API layer with private networking but also want the admin panel to be accessible. Right now we use uvicorn because we need it for async actions. Our dockerfile looks like this.
But we would like to have both ‘::’ as host for private networking and ‘0.0.0.0’ so the Django admin can be accessed. Is there any solution for this?
Project id:
04e1fc6d-4c23-41fc-b62d-9f4ae0620318
4 replies
Not correct python version in Nixpack when using dockerfile (used to work)
Hi there I am using a dockerFile with python:3.10-slim-buster
Problem: when i am deploying from my git it and I see the docker image being compiled i see using python
setup │ python38, gcc
I think i am not getting python version 3.10 as my dependancies seem broken but the python version is 3.8? This wasn't the case as i now cant install numpy. On my local machine the requirements.txt work perfectly and i can install all dependancies fine on WSL. I used to compile the same image perfectly with the same docker file on railway in other project (haven't rebuild it since weeks though). What could be wrong? Any help would be appricated. project id =16173128-f966-4c24-9def-b463fcd1f62d
I think i am not getting python version 3.10 as my dependancies seem broken but the python version is 3.8? This wasn't the case as i now cant install numpy. On my local machine the requirements.txt work perfectly and i can install all dependancies fine on WSL. I used to compile the same image perfectly with the same docker file on railway in other project (haven't rebuild it since weeks though). What could be wrong? Any help would be appricated. project id =16173128-f966-4c24-9def-b463fcd1f62d
7 replies
NiceGUI deployment to Railway help with dockerfile
Hi I hope someone can help me. So far I am loving Railway. I already have a Django project and it runs fine. Now I am using nicegui to build an app but I cannot get the deployment to Railway working. App Code is mostly in main.py
How to deploy my nicegui app to railway?
I created a dockerfile and it seems succesfully running but I think uvicorn is not running?
Code is below:
# Pull the official base image
FROM python:3.10-slim-buster
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# The port environment variable is set by Railway when the container is run
# But we can default it to 8080 for local development
ENV PORT=8080
# Expose the port
EXPOSE $PORT
# Set work directory in the container
WORKDIR /code
# Install dependencies
COPY requirements.txt /code/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy project
COPY . /code/
# Command to run on container start
CMD ["python", "main.py"]
In the console I get the feed:
NiceGUI ready to go on http://localhost:8080, and http://172.17.2.235:8080
But i think i need to expose it with the uvicorn? Can someone help?
project id: 3e62bf9f-3eee-4bbd-80e8-83d7d0e2acf149 replies
Trying to get Shopware Running please help
Hi there I am trying to get Shopware Running on Railway. I have created a Dockerfile on my repo but I am not sure how to continue
Here is my Dockerfile. Please note that on the official documentation I need to have a mysql root password. https://github.com/shyim/shopware
But I cant find this in the Railway mysql settings. When I add the service.
FROM mysql:8.0
ENV MYSQL_ROOT_PASSWORD=
ENV MYSQL_DATABASE=
ENV MYSQL_USER=
ENV MYSQL_PASSWORD=
FROM shyim/shopware:6.4.20-php8.2
ENV APP_SECRET=440dec3766de53010c5ccf6231c182acfc90bd25cff82e771245f736fd276518
ENV INSTANCE_ID=10612e3916e153dd3447850e944a03fabe89440970295447a30a75b151bd844e
ENV APP_URL=shopware-production.up.railway.app
ENV BLUE_GREEN_DEPLOYMENT=0
ENV DATABASE_HOST=containers-us-west-196.railway.app
ENV DATABASE_URL= [in railway account]
EXPOSE 80
What am I doing wrong? Can someone help me to get the Shopware running on Railway. Perhaps someone can create a template also for Shopware?
Project id is = f10cea7d-637b-4586-9521-f7437e3892964 replies
Cant run Django in Uvicorn with Dockerfile
Django with uvi corn
Hi all i am trying to get Django working with uvcorn. Guni corn works perfect but now I would like to use uvicorn since i have some async processes.
My docker file is here.
# Pull the official base image test
FROM python:3.10-slim-buster
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory in the container
WORKDIR /code
# Install dependencies
COPY requirements.txt /code/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy project
COPY . /code/
RUN python manage.py collectstatic --noinput
# Expose the port uWSGI will listen on
EXPOSE 8000
# Command to run the uWSGI server
CMD ["uvicorn", "myapp.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--lifespan", "off"]
The build seems to finish and also the server is running. However I get Application failed to respond on railway. What am i doing wrong? Also note that I am using RabbitMQ (Externally hosted) and views that connect to RabbitMQ. Do i need to start a worker? Local host works perfect with just the python -m uvicorn myproject.asgi:application command.
Any help is really appricated!
project id: 04e1fc6d-4c23-41fc-b62d-9f4ae06203186 replies