#development
1 messages · Page 215 of 1
ic
also
validating /opt/postgres/docker-compose.yml: services.postgres.volumes must be a list
wtf does this mean
I copied it 1:1 how it was before
not necessarily
I dont have any existing data
Error response from daemon: invalid mount config for type "volume": invalid mount path: 'pg_data' mount path must be absolute

What am I doing differently
then what they were doing
Right, so how can I use like psql if its behind docker?
or can I not
docker exec -it <the resulting container name> bash
zipline-1 | 2024-06-04 06:08:23,161 PM info [datasource] using Local(./uploads) datasource
zipline-1 | 2024-06-04 06:08:23,278 PM info [database::migrations] establishing database connection
zipline-1 | 2024-06-04 06:08:23,280 PM info [database::migrations] ensuring database exists, if not creating database - may error if no permissions
zipline-1 | 2024-06-04 06:08:23,474 PM error [database::migrations] Failed to migrate database... exiting...
zipline-1 | 2024-06-04 06:08:23,527 PM error [database::migrations] Error: P1000: Authentication failed against database server at `172.22.1.1`, the provided database credentials for `postgres` are not valid.
zipline-1 |
zipline-1 | Please make sure to provide valid database credentials for the database server at `172.22.1.1`.
zipline-1 | at Object.ensureDatabaseExists (/zipline/node_modules/@prisma/migrate/dist/utils/ensureDatabaseExists.js:137:11)
zipline-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
zipline-1 | at migrations (/zipline/src/server/util.ts:13:5)
zipline-1 | at prismaPlugin (/zipline/src/server/plugins/datasource.ts:12:3)
ripppppp
there is nothing at /var/lib/postgresql/data
what
relative to where you ran the command to start the compose
docker ps
ty
so
host all all 177.22.0.0/16 trust
```?
sure if you changed the subnet to that
mine was 172
yes thats 172
yea
my bad
😭
its been a long day and its not even 3pm
well
I changed the hba to allow that subnet
and restarted the container
then I restarted the zipline container
and still not working
same error ?
actually maybe not how do I clear docker logs so I can start it again with fresh logs
I think it may be using old logs and not updating for some reason
:D
IT WORKS
It connects
aaron@vmi1835760:~/zipline$ docker exec -it 8cc540479c41 bash
root@8cc540479c41:/# psql
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist
well rip
still gotta figure this out
but other than that
it seems to work
check out this slice of awesome
...brain
i made an AI script to linguisitically analyse each game location and produce a standarised json for each, indicating probability of successful hunting, and why it is or isnt a good idea to hunt there, also list of possible animals and loot drops each sorted by commonality
this will be the basis of hunting in my bot 😄
when its done, i'll feed the loot list back into another script and ask it to produce possible recipies
are u trying to make a rimworld-like storyteller?
hm, dwarf fortress?
nah
hard to exemplify then
its a story based RPG with multiplayer elements, im adding hunting for replay value and for something to let people grind
server {
listen 443;
listen [::]:443;
client_max_body_size 100M;
server_name files.aarondye.dev;
ssl on;
ssl_certificate /etc/ssl/certs/aarondye.dev.pem;
ssl_certificate_key /etc/ssl/certs/aarondye.dev.key;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
there's nothing wrong with this right?
It passes nginx -t
I set nginx to only allow https stuff which is why im not using port 80 here
and only 443
if I visit files.aarondye.dev it errors out
I don't need to do the files subdomain in my DNS settings do I?
I am using cloudflare origin certs
yes you do
subdomains can point to different ips
it is
then its not propagated yet
since the error is dns not found
@neon leaf actually wait
since I setup that subnet or whatever would zipline be on the main ip?
tho ig if I am reverse proxying it with nginx it would
thats a ts error not an eslint error
how long does this usally take?
said eslint when i hovered thoughhhh
oh wait

usually from a couple hours to a couple days
check nginx logs
ermmmm
I will figure out how
one sec
2024/06/04 12:18:32 [notice] 3168738#3168738: using inherited sockets from "6;7;"
2024/06/04 13:30:55 [warn] 3179598#3179598: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/sites-enabled/aarondye:8
2024/06/04 13:30:55 [warn] 3179600#3179600: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/sites-enabled/aarondye:8
2024/06/04 13:32:23 [warn] 3179760#3179760: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/sites-enabled/aarondye:8
only errors
try removing the proxy pass
and test it with a static return
ie
location / {
return "hi";
}
you mustn't declare ssl on
I keep it there just because, but no need to even include it
yeah the ssl should be in the port
I already removed that
now put it here
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
client_max_body_size 100M;
server_name files.aarondye.dev;
ssl_certificate /etc/ssl/certs/aarondye.dev.pem;
ssl_certificate_key /etc/ssl/certs/aarondye.dev.key;
ssl_verify_client on;
ssl_client_certificate /etc/ssl/certs/cloudflare.crt;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}```
this is my full config now
ur not using origin cert?
I am?
no
what error?
which is why im still here 😭
same error
connection timed out
error happens on the host aka files.aarondye.dev
check nginx logs
lemme get the path
/var/log/nginx/access.log
see what's the error for the connection
did you try a static response without the proxy pass? just to make sure the problem is nginx and not node
also run nginx -V and check if it has SNI enabled
TLS SNI support enabled
same problem
the access log has ips
idk if its ok to share that
yes i will hack you
huh
/s
dafuq lol
it looks like your access logs are gzipped lol
check your logs configuration in nginx.conf
wheres that
cause I could never find it
I assumed it was in /etc/nginx
but guess not
yeah thats for responses, not for logs
is there any log_format setting?
from what I can see no
so just rm it
yes
set your error logs to debug level
then read the error log instead
error_log /var/log/nginx/error.log debug;
well I nuked the logs and restarted nginx
tried visiting the site again and logs are empty
set one of these on port 80 without ssl, check if it works
also check if it works if you disable cloudflare proxy
I use this, if u wanna try
server {
listen 80;
listen [::]:80;
server_name YOUR_URL_HERE;
return 302 https://$server_name$request_uri;
}
just replace the url obviously
ye but if cf proxy is enabled, you will probably only be able to access that via IP
cloudflare will likely refuse to connect there without ssl
so basically, checklist:
- set up port 80, try to access via direct ip
- setup ssl, disable cf proxy, try to access via domain
- enable cf proxy, try to access via domain
and check error logs
Do I need to allow port 3000 on my firewall?
or does it not matter when nginx is involved
To Action From
-- ------ ----
Nginx HTTPS ALLOW Anywhere
Nginx Full ALLOW Anywhere
Nginx HTTPS (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
i dont think cloudflare cares about ssl
it depends on your settings
check browser console
you can configure it so the connection between cf and server is unencrypted
and cf does the rest with cf and client
man this becoming some bullshit
its always when I fuck with nginx do I have problems
😔
what happens if u nginx -t?
passes
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
if it appeared on the log then nginx did receive the request
but it stopped between it and the files
what files are u serving?
or is it an api?
this is what I am trying to do
huh
like, the server config
this file
where is it?
oh
the path
/etc/nginx/sites-available/aarondye
did u make a symlink on sites-enabled?
yup
no, try it
still the same thing in the logs?
nah, same thing, bottom is just favicon
this was all that was in the console before
so I assume now its actually pointing to the right place no?
is cloudflare giving that 522?

you can check by looking at the response headers of that request
there is no response headers
or ig there is my browser is just fucking slow
one sec
yea it appears to be coming from cloudflare
how did u declare ur addresses?
first one should be a cname
so a cname with an alias to aarondye.dev?
yes
yeah A records i think is for ip addresses, for another domain name you use cname
else your url would be smth like https://files
well lets see if that fixes it
it wouldn't prefix the base url
cloudflare is usually pretty fast when you change their internal dns settings
can you try route it to some other url/ip to make sure its even working
like google for example
rule out any cloudflare issue
like proxy pass my nginx stuff to google?
no change these to route to google or some other test ip
uhm
idk google's ip
well
files.aarondye.dev routes to google
so its not a cloudflare issue by the looks of it
note here is the updated dns settings
I hope i did this correctly
and im not brain dead
Does anyone know any good hosting providers like i.e. railway.app that have capped monthly payments?
I'm currently only using the free tiers anywhere I host.
I just don't want hoting to bite me in the a if for some unexpected reason the cost rises and I pay a couple of houndred dollars instead of the intended fixed price.
try to serve a static file to check
bro im honestly getting tired of this
it's not even that important for me to have a file host
😔
there's a placeholder index at /var/www/html
how do I serve this
wait until you have to debug something for a week straight
cause im really not trying to spend more time on this ngl
@sharp geyser
use the default nginx config
server {
listen 80;
listen [::]:80;
server_name files.aarondye.dev;
return 302 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
client_max_body_size 100M;
server_name files.aarondye.dev;
ssl_certificate /etc/ssl/certs/aarondye.dev.pem;
ssl_certificate_key /etc/ssl/certs/aarondye.dev.key;
ssl_verify_client on;
ssl_client_certificate /etc/ssl/certs/cloudflare.crt;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
}
thats not how docker works
assign your zipline container a subnet ip too
and use that
shouldve probably messed with the nginx stuff before actually setting up cloudflare to make sure it works
well I was following the zipline docs
so idk
im getting too long to respond with the ip you have here, not sure if thats intentional
but that points to an issue on your end
(the server)
so cloudflares working just fine
is the port open?
so like this?
and then in nginx proxy_pass http://172.22.1.2:3000?
and remove ports:
why remove ports?
so its only in the subnet
it needs a port to listen on?
and not on your host
that doesnt make it listen
that binds it to your host
nope
ok
but for nginx, is it in docker or standalone
k, did you make sure to open port 80 and 443
what host do you use? contabo?
contabo
alright
and try reloading nginx to see if it works
and is it proxy_pass http://172.22.1.2 or do I include :3000?
include 3000
still times out
ufw status
did you enable some sort of firewall on contabos side ?
idk how
netcat -l -p 52944
and leave it running until it closes
I havent done anything other than install nginx and allow Nginx FULL
and accidentally Nginx HTTPS
do you see anything in netcat?
Nothing yet
very weird
I tried connecting to the port
so it seems everything is closed
for some reason
How do I remove everything
not yet
try doing it
I did ufw disable ufw reset ufw allow 'Nginx Full' ufw enable
you know what i just noticed
ssh is not in his ufw list
I think ufw is not doing anything
ufw allow ssh
hm, makes sense
maybe its a contabo thing
I mean my contabo vps works fine
well what i mean is maybe it was an issue with contabo setting it up
iptables -L
because it was never enabled until I installed nginx and I enabled it
ufw comes disabled yeah
may sound like an apple response but, did you try restarting yet?
like rebooting the vps?
yea

and snow appears
Bro its doing the same shit here
and despawns after 5min
maybe im also in germany
we all are
It rains, gets hot asf, stops
then 10m later rains again
alright it rebooted
what now
did it fully start
looks like it yea
hm
i've never seen port checker work lol
to me it always shows closed even when its actually open
I've never seen any of my nginx shit work either
yeah netcat does work though
did you setup a basic port 80 static return and tested with direct ip access?
Idek how
sir
all of his ports are blocked
i showed you how
I tried making him open a netcat server
and making me connect
and he never got the connection
wtf is that
proxmox
does that bypass ufw?
just tested here and nothing shows for me either
ufw never worked in the first place
ssh was not in ufw and still worked
(yes ufw was on)
well i tested netcat on my own server and nothing shows either, and my nginx works
I didn't enable ufw until I installed nginx and allowed it
did you start netcat
yup
maybe tim's system is bricked to
my nginx works lol

both ways?
only on the receiving end
what is this payment stuff
just select free
What does this mean
guys is uptime robot the best hosting website?
did you restart zipline for the ip changes?
I did indeed
its not a hosting site lol
ok
OH THERE WEGO
\
wher can i host my bot well
let me try and remove the tunnel
why
Cause maybe that was the issue all along
its basically making a reverse connection
buy a good vps 
thats why it works
I just did docker compose restart
your ports are gone
Still doesn't hurt to try
its not

522 is no connection
did i talk to you im not talking with you im talking with @quartz kindle
wow
bruh

what if i was gonna say exactly the same thing?
@sharp geyser well im going to sleep now, if you cant find a way to fix your ports you know what to use instead
im gonna say
shut the fuck up
if you still wanna try making nginx work, let me know lol
lmao are you going for a ban speedrun?

😂
I would like to
cuz I can't use tunnels on cloudflare all the time
it makes no sense
if you dont need unproxied sites its fine
yeah makes sense lol
post your whole nginx conf file, and all files in sites-available and sites-enabled
Btw @sharp geyser
Are you sure that was the IP of your vps
Ssh also didn't respond on it
...
..,...,.......
LMAO
check your ifconfig
;;;::::::::
BRO WHY WOULD CONTABO CHANGE THE IP
@sharp geyser may I ask how U we're using ssh
same ip
Mm
Contabo moment
misty's bizarre adventures
Idk why I didn't think of this sooner tbh
Like, not even ssh worked
I thought U did like an Ip whitelist
Or something
lol
Well I have zipline
now to figure out how to automatically upload my screenshots to it
I mean, I do and never happened with me lmao
Iirc u need to explicitly request an ip change
Did u rent it just today?
Maybe it was still finishing setup and gave u a temporary ip meanwhile
rented it over a month ago
the rookiest of rookie mistakes
i dont fucking understand mathematical formulas @_@
like how the fuck do i convert this to code
I dont understand anything either
I am the professional rookie
In such complex formulas try to part it
Implement one formula first in a variable, then the second etc etc
Can help a lot
i tried but i keep getting wrong results
anyway my internet is gonna die because some transformer nearby just blew up and i have no power now
This is newton’s law of gravity, I’d suggest looking up a YouTube video on it. I think you’d get it pretty quick
get that handy man to fix it for $200
I dont use flameshot, I use the built in macos tool for taking screenshots
I still use jq to grab the files property tho I likely dont need to
and I use pbcopy to copy it to the clipboard
huh
there is no issue!
:p
Earlier it was because that domain wasn't routing to zipline properly
tho the problem was a faulty cloudflare config
I need to modify my code tho as its a little slow

I upload it to zipline in a janky way
import requests
import subprocess
from requests_toolbelt.multipart.encoder import MultipartEncoder
# Configuration
ZIPLINE_URL = "https://files.aarondye.dev/api/upload"
ZIPLINE_KEY = "key"
def upload_file(filepath):
multipart_data = MultipartEncoder(
fields={
'file': (filepath, open(filepath, 'rb'), 'image/png')
}
)
headers = {'Authorization': f'{ZIPLINE_KEY}', 'Format': 'uuid', 'Embed': 'true', 'Content-Type': multipart_data.content_type}
response = requests.post(ZIPLINE_URL, data=multipart_data, headers=headers)
if response.status_code == 200:
try:
result = subprocess.run(['jq', '-r', '.files[0]'], input=response.content.decode(), text=True,capture_output=True,check=True).stdout
subprocess.run(['pbcopy'], input=result, text=True,check=True,capture_output=False)
except subprocess.CalledProcessError as e:
print(f'Failed to process response with jq. Error: {e}')
print(f'jq stderr: {e.stderr}')
else:
print(f"Failed to upload {filepath}. Status code: {response.status_code}")
if __name__ == "__main__":
import sys
if len(sys.argv) != 2:
print("Usage: python upload_screenshot.py <path_to_file>")
else:
upload_file(sys.argv[1])
Say hello to my janky py script
💀
if __name__ == "__main__": lovely

ngl
chatgpt generated part of this
I just modified it to work with jq and pbcopy
I was too lazy to write it myself
which is probably why its slow asf
thought that was good practice
pythonists still recommend you place one there even if thats the case so i think youre fine
but it doesnt really amtter
it is, the funny part is how python doesn't have an actual entrypoint
the problem is
its slow
it takes like 2s to upload the image and then like another 2s to copy to clipboard
python isnt known for its blazingly fast performance
but its probably because youre spawning 2 processes just to do that so its gonna be slow
This took 10s to generate
https://files.aarondye.dev/u/aa594ce0-f440-4489-b4fc-a73fe57fd766.png

yeah thats gonna be incredibly slow
youre gonna have to do something else
like some library
I mean
I don't necessarily need jq
I just need to grab the url from
b'{"files": ["someurl"]}'
what is jq and pbcopy doing
jq grabs the url from the json response, and pbcopy copies it to the clipboard
its what the sh script does
I was converting it to a python script tho
cuz idk how to modify the sh script to do what I need
I mean if possible i'd love to just use curl
#!/bin/bash
curl -H "authorization: asdad" https://files.aarondye.dev/api/upload -F file=@/tmp/ss.png -H "Content-Type: multipart/form-data" -H "Format: uuid" -H "Embed: true" | jq -r '.files[0]' | tr -d '\n' | pbcopy;
my issue is, idk how to give it the file from watchman
bro is using a whole shell script just to grab a url and copy some data to clipboard
what
What are you on about?
How else am I going to upload the screenshot to the file host, then grab the viewable url
you expect me to do this manually
Its meant to be like sharex except sharex is on windows not mac
so I have to find my own way

that was unironically a good suggestion, except that it keeps generating code that doesnt work, but i think i can take it from there
you said jq grabs the url from the json, you can do that purely in python? pbcopy you can also replace for a Windows api call or whatever os you're using
but shell is fine for that too ig
although those combined shouldn't be 10 seconds slow so something else is probably going on too
Well I figured out how to use a shell script over a python script
#!/bin/bash
curl -H "authorization:sdfsdf" https://files.aarondye.dev/api/upload -F file=@$1 -H "Content-Type: multipart/form-data" -H "Format: random" | jq -r '.files[0]' | tr -d '\n' | pbcopy
Problem is, for some reason when watchman runs this, nothing happens
but if I run it manually it works fine

Hey haku, have you ever used watchman before?
nope
i mean its good for getting an idea or for reference

rip 😔
I am trying to google my problem but it seems like google wants me to watch a movie instead
Its a file/folder watcher that can also perform triggers when it changes
and it'll be easier to find answers on internet
Well, I need to watch the ~/Pictures folder for new screenshots and then call my sh script that takes in the file path to upload it to zipline
Watchman for some reason tho is sending over the placeholder string %f instead of the path
😔
so it can't find the file its looking for since its literally %f
I dont think I can use pm2 here no?
it can also listen to file changes
It wont give me the filepath of any new files added to the ~/Pictures dir right?
people use it all the time to hotswap code
I am looking to listen to the changes in a dir, and call an sh script when that change happens passing in the filepath to the newly added file
I've never seen pm2 have that ability
basically ./somescript.sh filepath is what I need to be called
and that filepath is the path of the newly added file to ~/Pictures dir
also u dont need watchman to give u the paths technically
u can just use find with creation filter
watchman is just a way to listen to the changes and call a trigger
How
How am I going to automate this on a new file being added. This is the problem I am facing
find /to/target/directory/* -msec 2
will show all files lastly modified 2 seconds ago
Ok
unless u spam printscreen key, it should give u correct results
u can get it even lower if u have the average time between file being created and watchman triggering
optionally, store the find . in a txt file and cross-compare when watchman triggers
the missing entries would be the newly added files
-msec is not a valid thing
well, I thought it was valid since -mmin is for mins
there's prolly one for seconds
oh, in fact
find /path/to/directory/* -newermt '2 seconds'
it returns nothing
Just took a screenshot
and it logs nothing
im honestly too tired to continue working on this
😔
It's dumb watchman was working when I was executing a python script
but as soon as I swapped to a sh script it was to complain and send over an incorrect value
@lyric mountain gimme a nice project to do in java
I want to practice my skills more
random update, i got my confessions game finished!
Good job
hello, how should I notify that Im going to do maintenance on the bots computer?
An opengl implementation of graphics2d
I started it once, things were getting complicated halfway
Bonus if u can beat regular graphics2d times
check console
tip: some browser apis can be blocked from cookie policies, thus will be made unavailable (runtime error if used) eg. localStorage

What is graphics2d?
Kuu don’t worry. Give me a few weeks and I got it done
Will publish it onto GitHub for you to track lmao
2d graphics
Hell nah I ain’t doing all that
Can I reroll? Gimme another project lmao tf is this
you expect me to control graphics etc 😭
ehh in the end it was that next-intl was trying to get non-existent keys because i was feeding it indexes and not values in a language select component
you used matrix to solve Fibonacci
there, use matrix to render graphics
ah
i pushed to prod thinking my thing works but after i checked... quick rollback

No shit but it’s more complicated than that

do you have an android phone?
oh same
but uh
Master programming by recreating your favorite technologies from scratch. - codecrafters-io/build-your-own-x
check this out
Make a browser in java /j
fully autonomous browser
it searches what you want before you even know what you want
💀
Do you like dbeaver?
Cant lie that shouldn’t be too hard
I already created a gui version of a browser it was pure shit. It would display the web contents on your console lmao. It was fully interactive as well though
I use it often
yeah just installed it, it seems like its just pgadmin. Which is fine with me ^-^
But it supports more than just pg
Yeah, that was kinda cool to see
hm?
I cant close it ^-^
never had that issue
neat
@neon leaf
I have a question about what we did yesterday. We made a subnet 172.22.0.0/16 but how exactly is this possible?
If this is a thing, why do people buy additional ips from the service providers?
How does it work though?
If I might ask
I tried googling but the answers I received were a little over my head 
what exactly do you want to know
it just tells your system to route ips starting with 172.22 to your system instead of the outside world
sudo docker network create Internal --driver=bridge --gateway=172.22.0.1 --subnet=172.22.0.0/16 --label=Internal
So this is the command I ran right.
I am not all too used to docker just yet, so docker network is something i've not run into.
From my understanding the way the command works is
docker network create Name
--driver=bridge (meaning bridge the connection from docker to the system making it inaccessible from the outside world?)
--gateway=172.22.0.1 (I assume we have to assign a ip in the subnet as the main ip of the internal network?)
--subnet=172.22.0.0/16 (you told me yesterday what this did but I forgot)
--label=Internal (I assume this just lets us keep track of our networks)```
bridge makes the subnet run over the same connection as the host, so you have internet instead of just nothing
subnet is just notation for what ips are affected basically
gateway yes
label yes
Hm
So docker is able to create internal networks separate from the main ip
allowing it to isolate it's connections?
Though it will all still be run over the same network as the host in the end right?
yes
Which is why zipline was able to work
despite having a connection to the internal network
hm I see
So any docker containers I run here on out, I should assign its own ip part of the subnet?
So long as it needs it ofc
well you dont
if it works and you know how to replicate the working state you probably know enough
(unless you actually need to KNOW how it works)
I mean
I don't know if I need to know how it works
but it likely will be helpful
Since im trying to setup a large scale e-commerce platform

mmm
Networking will be cruicial to know I feel like
Without knowing how to set it up, and how it works I won't be able to make it stable no?
Let alone secure
uh no
this is enough to protect all containers
so only processes ON the vps can access them directly
oh ok
nice
That's cruicial for me
ory kratos should only be accessed inside the vps from my understanding (I think)
We have Ory Kratos up and running, but we need to configure a reverse proxy to make the Kratos Admin API inaccessible via the public internet. We need to set serve.public.host and serve.admin.host to 127.0.0.1 to ensure Ory Kratos is listening on the loopback interface.
Unless I am misunderstanding this part
they are setting up Ory Kratos to only listen to internal connections right?
uh I dont have any context but thats what they are doing I guess ?
I would link the docs but idk if you'd want to read it to figure out

cuz my ass can't understand a lick of it
Though it seems like that's what they are trying to accomplish
ima just go for it
@sharp geyser are you in cs rn or a diff major?
I am writing a docker-compose file to better manage ory kratos, they also have their own config file of variables defined to make kratos work. Is there an easy way to pass it to compose? The way i've seen people talking about is mounting the config directory where the file is at, but that doesn't necessarily pass the config file to compose
Hello.
I am not in college atm
I am thinking of going for CS though
what
Can I please get help for the .py sdk?
The normal way to use kratos with docker is to
docker pull oryd/kratos:v1.1.0
docker run --rm -it oryd/kratos:v1.1.0 kratos.yml
I am making a compose file though instead to make it easier to manage running kratos in docker
I still need to be able to pass that kratos.yml file to it tho
#topgg-api is the best place to ask
version: '3.8'
services:
kratos:
image: oryd/kratos:v1.1.0
command: kratos.yml
hm
I wonder why people were talking about mounting the config dir then
if it was that easy
to save it
save it?
this is just your command translated 1:1
well
in this case kratos wil lcreate a new dir
and since its not mounted manually
that will create a volume
I see, I have a lot to learn about docker 
I assume this is what you essentially meant tho right?
version: '3.8'
services:
kratos:
image: oryd/kratos:v1.1.0
command: /mnt/config/kratos.yml
volumes:
- ./config:/mnt/config
this would mount
unless kratos does not auto create missing dirs
then it will error

What's the point of mounting it though
so you can edit it
Is it just to make it entirely accessible to the container?
would doing
services:
kratos:
image: oryd/kratos:v1.1.0
command: /opt/kratos/config/kratos.yml
volumes:
- ./config:/opt/kratos/config
mess anything up? as ./config would be the already made dir /opt/kratos/config since the docker-compose file is at the root of /opt/kratos
also
networks:
default:
name: Internal
external: true
``` does external make it accessible outside of the subnet if its true?
external means the network is already created and compose does not need to make it again
is this command peak creativity?
love it
kratos-migrate-1 | migrator: problem creating schema migrations: unable to execute statement: CREATE TABLE schema_migration (version VARCHAR (48) NOT NULL, version_self INT NOT NULL DEFAULT 0): ERROR: permission denied for schema public (SQLSTATE 42501)
Right guys, I don't know if its failing to connect because of how my compose file is setup or not, but something is happening here.
THe password is definitely correct i've checked like 20 times
version: '3.7'
services:
kratos-migrate:
image: oryd/kratos:v1.2.0
command: migrate sql -e -y
environment:
- DSN=postgres://kratos:no@172.22.1.1/kratos?sslmode=disable
kratos:
image: oryd/kratos:v1.2.0
command: serve --config /opt/kratos/config/kratos.yml
volumes:
- ./config:/opt/kratos/config
environment:
- CONFIG_FILE=/opt/kratos/config/kratos.yml
depends_on:
- kratos-migrate
networks:
default:
ipv4_address: 172.22.1.3
networks:
default:
name: Internal
external: true
ALTER DATABASE kratos OWNER TO kratos;
I basically followed this
do this
connect isnt enough to migrate
idk what the fuck just happened
but my logs got spammed
It seems to have worked ig....
Cookie clicker on Discord 
you should not be using public
well damn
dam
@lyric mountain what do you think about these stats? Looks good or bad?
well, any number is good tbh
okay @lyric mountain descobri um metodo melhor pra pegar transformar os espaços em branco em \\0, usando esse algorítimo, porém Match não pode ser usado em for, n sei qual o jeito correto de o usar em for
Alr
### This part is making use of space easier to handle, so there is no need to always type \0
### forhandling wise
pattern = r"\[(.*?)\]"
pivots = re.search(pattern, macro)
for num, i in enumerate(pivots):
piv = i
macro = macro.replace(f"[{i}]", f"[{num}]")
piv = piv.replate(" ", "\\0")
piv2 = re.search(piv, r"{.*?}")
for num2, j in enumerate(piv2):
piv3 = j
note = ["{", "}"]
piv = piv.replace(f"{note[0]}{j}{note[1]}", f"{note[0]}{num2}{note[1]}")
piv3 = piv3.replate("\\0", " ")
piv = piv.replace(f"{note[0]}{num2}{note[1]}", f"{note[0]}{piv3}{note[1]}")
macro = macro.replace(f"[{num}]", f"[{piv}]")
-142 too?
WTF does this mean
Its an auth api
It helps manage user registration and login as well as session management, verification, account recovery
why not diy it
Because I would rather let something meant to do tis job do it
I don't trust myself to DIY it in such an important project
well its also a good chance to learn auth
While it's a good chance to learn auth idrc to learn it atm
I'd rather let someone much smarter than me handle that kind of stuff.
kratos has turned femboy
i still need to finish god of war
eh eu tinha pesquisado aqui
mas n consigo entender por que o regex não acha os argumentos dentro de chaves
tipo, piv2 n era pra ser uma lista vazia
esse negócio é um saco
tipo, dou a instrução pra pressionar a faca contra a maçã
e o bagulho diz que não existe maçã
sendo que ela ta ali na frente
### This part is making use of space easier to handle, so there is no need to always type \0
### forhandling wise
pattern = r"\[(.*?)\]"
pivots = re.findall(pattern, macro)
for num, i in enumerate(pivots):
piv = i
print(f"{piv = }")
macro = macro.replace(f"[{i}]", f"[{num}]")
piv = piv.replace(" ", "\\0")
piv2 = re.findall(piv, r"\{(.*?)\}")
print(f"{piv2 = }")
for num2, j in enumerate(piv2):
piv3 = j
note = ["{", "}"]
piv = piv.replace(f"{note[0]}{j}{note[1]}", f"{note[0]}{num2}{note[1]}")
piv3 = piv3.replace("\\0", " ")
piv = piv.replace(f"{note[0]}{num2}{note[1]}", f"{note[0]}{piv3}{note[1]}")
macro = macro.replace(f"[{num}]", f"[{piv}]")
eu detesto quando acontece uns bagulho desse
piv2 = re.findall(piv, r"\{(.*?)\}") esse?
oq é re?
é da biblioteca imbutida de regex
re
usa biblioteca de regex
ta, printa print(piv)
eu já printei
cade
aqui
ata n, n ai
printa antes do piv2
o problema provavelmente é aquilo q to te falando faz tempo
n se deve usar barra-numero
s, é isso msm






