How can i check my .env with a "inside shell"

Hello, i want to know how can i enter into my container to check if the .env exist
13 Replies
Percy
Percy6mo ago
Project ID: 0f5eadec-41b9-4d22-b1cf-efcaa05259b6
Patrick〽
Patrick〽6mo ago
0f5eadec-41b9-4d22-b1cf-efcaa05259b6 Do Railway create a .env when i add something in service variable ?
Fragly
Fragly6mo ago
Railway doesn't offer ssh So there's no way to do that I think it just adds it as an env variable in the docker container it created for your app
Patrick〽
Patrick〽6mo ago
thanks for your reply But i don't know how i can use this var in my php, because actually i need an .env to get this var
pipisasa
pipisasa6mo ago
My API can't read env vars - Railway
hey, im trying to deploy a php-fpm api and i got a local .env file and i got the same .env at the railway project vars, but my api doesn't seem to be able to access it My custom dockerfile: ```docker FROM composer:2.4.4 AS composer FROM php:7.4-fpm as base COPY --from=composer /usr/bin/composer /usr/bin/composer RUN mv "$PHP_INI_DIR/php.ini-pro...
Solution
pipisasa
pipisasa6mo ago
No description
pipisasa
pipisasa6mo ago
@Patrick〽
Patrick〽
Patrick〽6mo ago
Ohhh just using $_SERVER['AWS_S3_ENV'] than $_ENV['AWS_S3_ENV'] ?
Patrick〽
Patrick〽6mo ago
This is not solved x)
Brody
Brody6mo ago
oh, why not? medim is a php developer and that was the answer in another thread. what are you still having troubles with? railway will not make an .env file inside your container if that's what you're after?
Patrick〽
Patrick〽6mo ago
Thanks for your answer ! So yes after couple of time, this solution just worked Thanks a lot !
Brody
Brody6mo ago
haha no problem