Faruq Alli-Balogun
Faruq Alli-Balogun
Explore posts from servers
CCoder.com
Created by Faruq Alli-Balogun on 9/21/2024 in #help
Is this an anti-pattern for coder?
I’m exploring Coder for my team members and I’m wondering if creating a docker template that install Postgres and Redis would be an anti-pattern mainly because of the infrastructures required to run the services.
18 replies
RRailway
Created by Faruq Alli-Balogun on 9/10/2024 in #✋|help
With railway, how can I restrict traffic? I want my server to receive traffic from a particular IP
With railway, how can I restrict traffic? I want my server to receive traffic from a particular IP. It's a react application.
6 replies
RRailway
Created by Faruq Alli-Balogun on 7/23/2024 in #✋|help
Environment variables function
Hi I'm trying generate secrets for my application through the variables. Is there a list of available functions in the document? I can't find it
14 replies
RRailway
Created by Faruq Alli-Balogun on 7/23/2024 in #✋|help
Environment variables function
Hi I'm trying generate secrets for my application through the variables. Is there a list of available functions in the document? I can't find it
5 replies
RRailway
Created by Faruq Alli-Balogun on 7/23/2024 in #✋|help
Payment issue with trial account
No description
20 replies
RRailway
Created by Faruq Alli-Balogun on 7/23/2024 in #✋|help
Railway website is unreachable
Hello I’ve been trying to use the railway dashboard to deploy some apps and it’s been unreachable for me since yesterday. I’m from Nigeria. Please help
5 replies
HHono
Created by Faruq Alli-Balogun on 5/14/2024 in #help
How can I format response in Hono
I would like my responses to adhere to a particular format, what is the best way to achieve this?
3 replies
DTDrizzle Team
Created by Faruq Alli-Balogun on 5/10/2024 in #help
Using drizzle how do I check if my database connection is established before starting my express app
Using drizzle how do I check if my database connection is established before starting my express app
1 replies
RRailway
Created by Faruq Alli-Balogun on 4/29/2024 in #✋|help
How do I create a template from the following Docker files?
Dockerfile
FROM postgres:16-alpine3.19

RUN apk -U add --no-cache \
alpine-sdk \
curl-dev \
clang15 \
llvm15 \
perl

RUN git clone https://github.com/supabase/pg_net.git

RUN cd pg_net && \
make && make install

RUN cd / && \
rm -rf pg_net && \
apk cache clean

RUN echo '#!/bin/bash' > /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'set -e' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'CREATE USER postgres;' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'ALTER ROLE postgres SUPERUSER;' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'CREATE EXTENSION IF NOT EXISTS pg_net;' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'EOSQL' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
chmod +x /docker-entrypoint-initdb.d/00-pg-net.sh
FROM postgres:16-alpine3.19

RUN apk -U add --no-cache \
alpine-sdk \
curl-dev \
clang15 \
llvm15 \
perl

RUN git clone https://github.com/supabase/pg_net.git

RUN cd pg_net && \
make && make install

RUN cd / && \
rm -rf pg_net && \
apk cache clean

RUN echo '#!/bin/bash' > /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'set -e' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'CREATE USER postgres;' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'ALTER ROLE postgres SUPERUSER;' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'CREATE EXTENSION IF NOT EXISTS pg_net;' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
echo 'EOSQL' >> /docker-entrypoint-initdb.d/00-pg-net.sh && \
chmod +x /docker-entrypoint-initdb.d/00-pg-net.sh
docker-compose.yml
version: '3.7'

services:
postgres:
build:
context: .
image: postgresql:16-alpine3.19-pg_net
ports:
- '5432:5432'
command: postgres -c shared_preload_libraries=pg_net -c pg_net.database_name=${POSTGRES_DB} -c max_connections=200
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped

volumes:
postgres_data:
version: '3.7'

services:
postgres:
build:
context: .
image: postgresql:16-alpine3.19-pg_net
ports:
- '5432:5432'
command: postgres -c shared_preload_libraries=pg_net -c pg_net.database_name=${POSTGRES_DB} -c max_connections=200
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped

volumes:
postgres_data:
32 replies
RRailway
Created by Faruq Alli-Balogun on 7/6/2023 in #✋|help
Why can't I verify?
19 replies
RRailway
Created by Faruq Alli-Balogun on 6/27/2023 in #✋|help
Github and Railway: How can I setup/link my github environment to my different deployments?
Github and Railway: How can I setup/link my github environment to my different deployments? I'm using Github CI to trigger deployment as shown here (https://blog.railway.app/p/github-actions) For example on Github, I have 3 environments (develop/QA/production). The idea here is to only have a single branch (develop) which is going to trigger builds via merging and pushing while the QA and production is going trigger builds with release tags. I'm not sure railways is equipped for that, though I know we can create multiple environment on railway. Can it handle this? Also how can I automatically get the deployment URL and also get deployment URL for my PR builds? I want the URLs to reflect on Github under environment, I can setup an other enviroment for PR build links or better still it should have the short sha as subdomain.
4 replies
RRailway
Created by Faruq Alli-Balogun on 3/21/2023 in #✋|help
Railway stuck on deployment
6 replies
RRailway
Created by Faruq Alli-Balogun on 3/5/2023 in #✋|help
Getting 503 from my PR build URL. What does it mean?
12 replies
RRailway
Created by Faruq Alli-Balogun on 3/4/2023 in #✋|help
How can I get two instance of Redis for an app
In my application, We are using different redis databases to manage cache and queue. At the moment, I'm only able to create one redis instance but I need multiple. How can I achieve this?
7 replies
RRailway
Created by Faruq Alli-Balogun on 3/4/2023 in #✋|help
Railway postgres env is quite different from what I intend to use as per my company styleguide
Hello I noticed that with Railway postgres we have envs like PGHOST PGPORT. Is there a way to change it to something like POSTGRES_HOST and so on. Of course I could just reassign the envs but this won't work for PR builds
14 replies
RRailway
Created by Faruq Alli-Balogun on 3/2/2023 in #✋|help
Does railway have any env for the currently deployed URL?
At the moment I use railway for deployments and also PR builds. I want to be able to get dynamic URLs of the deployed service. Is there any ENV that enables us get the current URL?
8 replies
RRailway
Created by Faruq Alli-Balogun on 3/1/2023 in #✋|help
My app is stuck on deployment
11 replies