docker deployment
Anonymous
TRIALOP

2 years ago

Hi, sorry, I have a question. I want to upload a project to Railway that I have in a repository. Inside the repository, I have a container where I have the database, and that generates another one where I have the project. I'm new to Docker, so I'm not sure how it works exactly, but I know that I run 'sudo docker compose up -d' and it generates 2 containers. Then, inside the container, I have to run some Laravel-specific commands. My question is how to do this with Railway

0 Replies

Anonymous
TRIALOP

2 years ago

N/A


brody
EMPLOYEE

2 years ago

please share the compose file and all the commands you need to run and where


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

when i clone the commands are
sudo docker compose up -d
that generates 2 dockers, pgscomputacion and scomputacion-1
sudo docker exec -it scomputacion-1 bash
and then
compose install


brody
EMPLOYEE

2 years ago

well first off, your dockerfile should be doing compose install


Anonymous
TRIALOP

2 years ago

mmm how?


Anonymous
TRIALOP

2 years ago

composer install*


Anonymous
TRIALOP

2 years ago

I do the composer install inside the container, after docker exec -it bash


brody
EMPLOYEE

2 years ago

do it in your dockerfile


brody
EMPLOYEE

2 years ago

via RUN


Anonymous
TRIALOP

2 years ago

okey ill see how


Anonymous
TRIALOP

2 years ago

after the composer install i do this

1231353155673915400


brody
EMPLOYEE

2 years ago

you'd do all the artisan stuff in the dockerfile too, and you might not need chown at all


Anonymous
TRIALOP

2 years ago

like this?

1231353676593889300


brody
EMPLOYEE

2 years ago

you should not be doing multiple updates and installs, condense all apt stuff into a single command


Anonymous
TRIALOP

2 years ago

like this?

1231356111563657200


Anonymous
TRIALOP

2 years ago

Oh, one more thing I also do BEFORE the php artisan commands is cp .env.example .env and in the .env file I set dbhost=pgscomputacion, dbport=5432, dbdatabase=taller, dbuser=postgres, db_password=postgres


brody
EMPLOYEE

2 years ago

yeah that's looking much better, but since you need the database variables in the dockerfile you need to reference them in the dockerfile with ARG


brody
EMPLOYEE

2 years ago

you'd set those in your service variables


Anonymous
TRIALOP

2 years ago

how?


Anonymous
TRIALOP

2 years ago

1231359423268655000


Anonymous
TRIALOP

2 years ago

1231359477903786000


Anonymous
TRIALOP

2 years ago

I do not know if it is ok


brody
EMPLOYEE

2 years ago

you had it right in the first screenshot, you dont need the ENV stuff


Anonymous
TRIALOP

2 years ago

ok, only that, and now?


brody
EMPLOYEE

2 years ago

does your app need postgres 14? would 16 work?


Anonymous
TRIALOP

2 years ago

I really don't know… It should work, I just use Laravel's eloquent for relationships and create/delete records, nothing complicated


brody
EMPLOYEE

2 years ago

okay then cant hurt to try 16


brody
EMPLOYEE

2 years ago

do you already have a railway project?


Anonymous
TRIALOP

2 years ago

No, I had created it and deleted it because I didn't know how to do it


brody
EMPLOYEE

2 years ago

well then lets walk through the steps


Anonymous
TRIALOP

2 years ago

so I started from 0


brody
EMPLOYEE

2 years ago

create an empty project and name it


brody
EMPLOYEE

2 years ago

and please send screenshots at every step of the way


Anonymous
TRIALOP

2 years ago

from a github repo right?


brody
EMPLOYEE

2 years ago

nope, we hardly ever want to do that


brody
EMPLOYEE

2 years ago

an empty project

please make sure to carefully read my messages


Anonymous
TRIALOP

2 years ago

sorry,


Anonymous
TRIALOP

2 years ago

1231367519428673500


brody
EMPLOYEE

2 years ago

add a postgres database


Anonymous
TRIALOP

2 years ago

1231367743476076800


brody
EMPLOYEE

2 years ago

create a new empty service


Anonymous
TRIALOP

2 years ago

1231367893002748000


brody
EMPLOYEE

2 years ago

name it and deploy it


Anonymous
TRIALOP

2 years ago

1231368293575692300


brody
EMPLOYEE

2 years ago

can you copy and paste the ARGs you have in your dockerfile for me


Anonymous
TRIALOP

2 years ago

ARG DBHOST ARG DBPORT
ARG DBDATABASE ARG DBUSERNAME
ARG DB_PASSWORD


brody
EMPLOYEE

2 years ago

open up your service's raw editor and paste this in -

DB_HOST=${{Postgres.PGHOST}}
DB_PORT=${{Postgres.PGPORT}}
DB_DATABASE=${{Postgres.PGDATABASE}}
DB_USERNAME=${{Postgres.PGUSER}}
DB_PASSWORD=${{Postgres.PGPASSWORD}}

and then deploy it


Anonymous
TRIALOP

2 years ago

1231368938533949400


Anonymous
TRIALOP

2 years ago

1231368993533857800


brody
EMPLOYEE

2 years ago

and just this once no screenshot, click their eye icons to make sure they all show properly


Anonymous
TRIALOP

2 years ago

yes


Anonymous
TRIALOP

2 years ago

are the same of postgres


brody
EMPLOYEE

2 years ago

did you have any other environment variables that you need to set for it?


Anonymous
TRIALOP

2 years ago

my .env file has more things but idk if are necesary


Anonymous
TRIALOP

2 years ago

APPNAME=Laravel APPENV=local
APPKEY=base64:NP+/oB4Sc1mx4ISoyM6LECEJoLn2/gmQD9oe1zF8hwc= APPDEBUG=true
APP_URL=http://localhost

LOGCHANNEL=stack LOGDEPRECATIONSCHANNEL=null LOGLEVEL=debug

DBCONNECTION=pgsql DBHOST=pgscomputacion
DBPORT=5432 DBDATABASE=taller
DBUSERNAME=postgres DBPASSWORD=postgres

BROADCASTDRIVER=log CACHEDRIVER=file
FILESYSTEMDISK=local QUEUECONNECTION=sync
SESSIONDRIVER=file SESSIONLIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDISHOST=127.0.0.1 REDISPASSWORD=null
REDIS_PORT=6379

MAILMAILER=smtp MAILHOST=mailpit
MAILPORT=1025 MAILUSERNAME=null
MAILPASSWORD=null MAILENCRYPTION=null
MAILFROMADDRESS="hello@example.com"
MAILFROMNAME="${APP_NAME}"

AWSACCESSKEYID= AWSSECRETACCESSKEY=
AWSDEFAULTREGION=us-east-1
AWSBUCKET= AWSUSEPATHSTYLE_ENDPOINT=false

PUSHERAPPID=
PUSHERAPPKEY=
PUSHERAPPSECRET=
PUSHERHOST= PUSHERPORT=443
PUSHERSCHEME=https PUSHERAPP_CLUSTER=mt1

VITEAPPNAME="${APPNAME}" VITEPUSHERAPPKEY="${PUSHERAPPKEY}"
VITEPUSHERHOST="${PUSHERHOST}" VITEPUSHERPORT="${PUSHERPORT}"
VITEPUSHERSCHEME="${PUSHERSCHEME}" VITEPUSHERAPPCLUSTER="${PUSHERAPPCLUSTER}"


Anonymous
TRIALOP

2 years ago

i didnt touch anything of these, only the db things


brody
EMPLOYEE

2 years ago

well add everything that is necessary to your service variables


Anonymous
TRIALOP

2 years ago

I add all that


Anonymous
TRIALOP

2 years ago

on the service?


brody
EMPLOYEE

2 years ago

but the syntax changes from ${PUSHER_HOST} to ${{PUSHER_HOST}}


brody
EMPLOYEE

2 years ago

yes


Anonymous
TRIALOP

2 years ago

VITEAPPNAME="${{APPNAME}}" VITEPUSHERAPPKEY="${{PUSHERAPPKEY}}"
VITEPUSHERHOST="${{PUSHERHOST}}" VITEPUSHERPORT="${{PUSHERPORT}}"
VITEPUSHERSCHEME="${{PUSHERSCHEME}}" VITEPUSHERAPPCLUSTER="${{PUSHERAPPCLUSTER}}"


Anonymous
TRIALOP

2 years ago

like that


brody
EMPLOYEE

2 years ago

yep, no quotes though


brody
EMPLOYEE

2 years ago

but ${{APP_NAME}} isnt going to do anything unless you have also set APP_NAME as well


Anonymous
TRIALOP

2 years ago

1231370871898243000


brody
EMPLOYEE

2 years ago

and always make sure you check them with the eye icon


Anonymous
TRIALOP

2 years ago

I don't know, I didn't touch any of that, just the db stuff and nothing else, I left everything else as is


Anonymous
TRIALOP

2 years ago

1231371223443705900


Anonymous
TRIALOP

2 years ago

its ok


brody
EMPLOYEE

2 years ago

awsome


brody
EMPLOYEE

2 years ago

now set PORT=80


Anonymous
TRIALOP

2 years ago

1231371743239868400


brody
EMPLOYEE

2 years ago

go into its settings and generate a domain


Anonymous
TRIALOP

2 years ago

done


Anonymous
TRIALOP

2 years ago

1231372157481779200


brody
EMPLOYEE

2 years ago

and i assume you have the dockerfile and your app in a repo right?


Anonymous
TRIALOP

2 years ago

yes


brody
EMPLOYEE

2 years ago

okay then go ahead and connect your repo


Anonymous
TRIALOP

2 years ago

herE?

1231372720617296000


brody
EMPLOYEE

2 years ago

yep


Anonymous
TRIALOP

2 years ago

1231372814561448000


brody
EMPLOYEE

2 years ago

deploy


Anonymous
TRIALOP

2 years ago

building


brody
EMPLOYEE

2 years ago

let me know how that goes


Anonymous
TRIALOP

2 years ago

it keeps

1231373522438193200


brody
EMPLOYEE

2 years ago

we shall wait


Anonymous
TRIALOP

2 years ago

1231373884272672800



brody
EMPLOYEE

2 years ago

build logs please -


Anonymous
TRIALOP

2 years ago

1231374098165272600


brody
EMPLOYEE

2 years ago

use the bookmarklet please


Anonymous
TRIALOP

2 years ago

im trying


Anonymous
TRIALOP

2 years ago

i dont understand, where do I have to drag the download logs?


brody
EMPLOYEE

2 years ago

to the bookmarks bar


Anonymous
TRIALOP

2 years ago

1231375659188879400


brody
EMPLOYEE

2 years ago

you will want to enable the bookmarks bar


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

your dockerfile needs to also install the composer cli before running the composer command


Anonymous
TRIALOP

2 years ago

1231376522435100700


Anonymous
TRIALOP

2 years ago

?


brody
EMPLOYEE

2 years ago

i dont know php and the php eco system, so you tell me lol, is that how you install composer?


Anonymous
TRIALOP

2 years ago

I really don't know hahaha I don't know about this myself, they gave me a container made and I only did everything in Laravel hahaha


Anonymous
TRIALOP

2 years ago

chat gpt will help me


brody
EMPLOYEE

2 years ago

it would definitly be beneficial to learn the php ecosystem


Anonymous
TRIALOP

2 years ago

It seems that if it is done that way


Anonymous
TRIALOP

2 years ago

yes, its good. i´ll push


brody
EMPLOYEE

2 years ago

sounds good


Anonymous
TRIALOP

2 years ago

done


Anonymous
TRIALOP

2 years ago

try to build again?


brody
EMPLOYEE

2 years ago

yeah push your changes to github


Anonymous
TRIALOP

2 years ago

1231378302082744300


Anonymous
TRIALOP

2 years ago

fail again


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

Composer could not find a composer.json file in /var/www/scomputacion

Anonymous
TRIALOP

2 years ago

Sure. The composer.json file is inside the src folder, but I run composer install from inside the container, after having run sudo docker exec -it scomputacion-1 bash


Anonymous
TRIALOP

2 years ago

1231380609549471700


brody
EMPLOYEE

2 years ago

please make sure you have the composer.json file in the correct location


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

thats the repository, its in src


brody
EMPLOYEE

2 years ago

yep i saw, please make sure you have the composer.json file in the correct location


Anonymous
TRIALOP

2 years ago

It's okay, it has to be there


Anonymous
TRIALOP

2 years ago

I mean, whenever I raised the project it was there and I had no problem. In my local project it is there


brody
EMPLOYEE

2 years ago

then you are in the wrong working directory in your dockerfile


Anonymous
TRIALOP

2 years ago

but there is one thing I don't understand, railway creates the containers? or how does that work?


brody
EMPLOYEE

2 years ago

railway builds and runs the container, but your dockerfile defines how the container is built


Anonymous
TRIALOP

2 years ago

I am raising the container in my premises to see if it works for me


Anonymous
TRIALOP

2 years ago

1231382702041862400


brody
EMPLOYEE

2 years ago

building the docker container is easier than letting railway do it if you have the means to do that


Anonymous
TRIALOP

2 years ago

1231383007797969000


Anonymous
TRIALOP

2 years ago

:/


brody
EMPLOYEE

2 years ago

same thing


brody
EMPLOYEE

2 years ago

maybe your dockerfile runs that command in the wrong directory


Anonymous
TRIALOP

2 years ago

yes but i dont understand


brody
EMPLOYEE

2 years ago

read the docs section I linked


Anonymous
TRIALOP

2 years ago

i read it but i dont understand.
Look, the old dockerfile works correctly, but the new doesnt

1231384725667709200


Anonymous
TRIALOP

2 years ago

i mean, the old dockerfile doesnt have the run composer install comand, but the route is supposed to be the same


brody
EMPLOYEE

2 years ago

you can't assume it's going to work the same when you aren't using docker compose, and you don't have ssh into the container so you need to set everything up beforehand in your dockerfile


Anonymous
TRIALOP

2 years ago

FROM php:8.2-apache

Define las variables de entorno para la base de datos usando ARG

ARG DBHOST ARG DBPORT
ARG DBDATABASE ARG DBUSERNAME
ARG DB_PASSWORD

Instala las dependencias necesarias para Laravel

RUN apt-get update && apt-get install -y \
libzip-dev \
zip \
unzip \
git \
zlib1g-dev \
libpng-dev \
libpq-dev \
libicu-dev \
libxslt1-dev \
g++ \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libxml2-dev \
librabbitmq-dev \
libssh-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Instala Composer

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Copia el código de tu aplicación Laravel al directorio /var/www/html

COPY src /var/www/scomputacion

Configura el directorio de trabajo

WORKDIR /var/www/scomputacion

Copia el archivo composer.json

COPY src/composer.json /var/www/scomputacion/composer.json

Instala extensiones de PHP

RUN docker-php-ext-install zip pdomysql gd pdopgsql intl xsl opcache mysqli pdo pdo_mysql soap

Instala APCu

RUN pecl install apcu && docker-php-ext-enable apcu

Instala extensiones adicionales

RUN pecl install amqp && docker-php-ext-enable amqp

Configura Apache

RUN a2enmod rewrite

Ejecutar composer install

RUN composer install

Ejecutar comandos de Artisan de Laravel

RUN php artisan migrate:fresh --seed
RUN php artisan key:generate
RUN php artisan optimize:clear

Expone el puerto 80 para que puedas acceder a la aplicación desde tu navegador

EXPOSE 80

Inicia Apache cuando se inicia el contenedor

CMD ["apache2-foreground"]


Anonymous
TRIALOP

2 years ago

i did that


Anonymous
TRIALOP

2 years ago

but idk ill try


brody
EMPLOYEE

2 years ago

make sure you enclose code in triple back ticks


Anonymous
TRIALOP

2 years ago

well its seem its working

1231386604430561300


Anonymous
TRIALOP

2 years ago

1231386960766177300


brody
EMPLOYEE

2 years ago

now try on railway


Anonymous
TRIALOP

2 years ago

ok


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

what even is pecl?


Anonymous
TRIALOP

2 years ago

good question


Anonymous
TRIALOP

2 years ago

RUN pecl install apcu installs the APCu extension using the pecl package manager.

RUN docker-php-ext-enable apcu enables the installed APCu extension within the PHP environment inside the Docker container.


brody
EMPLOYEE

2 years ago

it's going to be quite difficult to deploy your app if you aren't familiar with the technologies involved


brody
EMPLOYEE

2 years ago

I would recommend getting familiar with all the technologies involved, because I don't know php so I'm only able to really help with the railway side of things


Anonymous
TRIALOP

2 years ago

At work, I was given this container to develop something in Laravel that is still in progress. Simultaneously, I started working on this project, and at work, they recommended that I use the same container since I was also going to use Laravel, but I don't know what it has. I just spun up the project and programmed


Anonymous
TRIALOP

2 years ago

but I'm not in charge of uploading to production so I don't know what the procedure is like, I only program, I did this on my own that's why I don't know how to take it to production


brody
EMPLOYEE

2 years ago

just learning the language can only get you so far, i can not express how important it is to know the ecosystem too


brody
EMPLOYEE

2 years ago

but with that said, i think your last error might not be your doing, i just saw someone else get the exact same error and i know their deployment was working before


Anonymous
TRIALOP

2 years ago

I know, it's My first work, i start like 3 months ago and im learning


Anonymous
TRIALOP

2 years ago

But in this case im lost


brody
EMPLOYEE

2 years ago

try re-deploying, Google might have had some network troubles


Anonymous
TRIALOP

2 years ago

ok, builiding


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

same error?


brody
EMPLOYEE

2 years ago

check out this link


Anonymous
TRIALOP

2 years ago

ok, but that clean the db. It only runs once right?


brody
EMPLOYEE

2 years ago

it shouldn't wipe anything, but as always with uncertainty make sure to check that yourself


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

Hello, yesterday I had to go. Failed again


brody
EMPLOYEE

2 years ago

can you show me the code that connects to the database?


Anonymous
TRIALOP

2 years ago

Laravel does that, it is not done manually, you just put the data in the .env


brody
EMPLOYEE

2 years ago

but you still define the variables laravel uses in code, dont you?


Anonymous
TRIALOP

2 years ago

DB_CONNECTION=pgsql
I was missing that in the railway variables



brody
EMPLOYEE

2 years ago

i figured it was something like that


Anonymous
TRIALOP

2 years ago

1231710623646355500


Anonymous
TRIALOP

2 years ago

It's taking a long time, it's good, at least it doesn't fail xd


brody
EMPLOYEE

2 years ago

unoptimized dockerfile most likely


Anonymous
TRIALOP

2 years ago

1231711568236908800


Anonymous
TRIALOP

2 years ago

It didn't fail, but if I see the logs it says that


brody
EMPLOYEE

2 years ago

looks like you ran into the build time limit of the trial plan


Anonymous
TRIALOP

2 years ago


brody
EMPLOYEE

2 years ago

>> RUN pecl install amqp && docker-php-ext-enable amqp

No releases available for package "pecl.php.net/amqp"
install failed

Anonymous
TRIALOP

2 years ago

1231715763807850800


Anonymous
TRIALOP

2 years ago

try to do docker compose up -d locally and it throws that error. From what I saw, it is normal because the database is not created until the container that has Postgres is finished being created. But on railway there should not be this problem


Anonymous
TRIALOP

2 years ago

The important thing is that it did not throw the pecl install amqp error


brody
EMPLOYEE

2 years ago

yeah because it didnt get to that stage yet


Anonymous
TRIALOP

2 years ago

No, the php artisan is the last instruction


Anonymous
TRIALOP

2 years ago

Look the blue text, the install amqp executed correctly


brody
EMPLOYEE

2 years ago

gotcha


brody
EMPLOYEE

2 years ago

but it didnt on railway, meaning there is an issue with your dockerfile


Anonymous
TRIALOP

2 years ago

But how, it's the same dockerfile


brody
EMPLOYEE

2 years ago

^


Anonymous
TRIALOP

2 years ago

But how can it be that this line operates locally and not on the railway? It is not a dockerfile problem because it works for me


brody
EMPLOYEE

2 years ago

im sorry but working locally does not mean its a platform issue


Anonymous
TRIALOP

2 years ago

try again without changing anything


brody
EMPLOYEE

2 years ago

^


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

same error?


brody
EMPLOYEE

2 years ago

i think we should pick this back up when you are more familiar with the php ecosystem, im sorry i couldnt help you further


Anonymous
TRIALOP

2 years ago

but here he throw another error


Anonymous
TRIALOP

2 years ago

From what I see the problem is that you cannot run the php artisan from there


brody
EMPLOYEE

2 years ago

its due to a config issue, im sorry as i dont know php my usefulness has ran out


Anonymous
TRIALOP

2 years ago

but there is no way to throw those commands after the build has finished? like a railway console


brody
EMPLOYEE

2 years ago

you can do it in your start command sure


Anonymous
TRIALOP

2 years ago

i delete the php artisan commands, building again


brody
EMPLOYEE

2 years ago

well you can't just delete them


brody
EMPLOYEE

2 years ago

this is why i suggested coming back to this when you are more familiar with the php eco system


Anonymous
TRIALOP

2 years ago

1231720523600363500


brody
EMPLOYEE

2 years ago

any variable you use during build needs to be referenced with ARG


brody
EMPLOYEE

2 years ago

and now your database is likely not migrated


Anonymous
TRIALOP

2 years ago

php artisan are exclusive Laravel commands, they are for executing internal commands. They can be done at any time. At any time I run the php artisan migrate and it generates the database, it does not have to be with the creation of the project


brody
EMPLOYEE

2 years ago

but railway does not provide ssh


Anonymous
TRIALOP

2 years ago

That's what I meant with the railway console


brody
EMPLOYEE

2 years ago

there is no such thing


brody
EMPLOYEE

2 years ago

you can use railway run but that only runs the command locally with the service variables available


brody
EMPLOYEE

2 years ago

your best options are to run them in the dockerfile or in the start command


Anonymous
TRIALOP

2 years ago

1231722563760296000


Anonymous
TRIALOP

2 years ago

i found that in a forum


brody
EMPLOYEE

2 years ago

you arent using nixpacks


Anonymous
TRIALOP

2 years ago

1231723358354407700


Anonymous
TRIALOP

2 years ago

ill try to do that


brody
EMPLOYEE

2 years ago

it was not my suggestion to use nixpacks


Anonymous
TRIALOP

2 years ago

But I'm seeing that many people solve it that way, how can I do it?


brody
EMPLOYEE

2 years ago

maybe you have forgotten to use an ARG


Anonymous
TRIALOP

2 years ago

1231724641740001300


brody
EMPLOYEE

2 years ago

^


brody
EMPLOYEE

2 years ago

^


Anonymous
TRIALOP

2 years ago

true


Anonymous
TRIALOP

2 years ago

1231728439371895000


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

but failed in the next instruction


brody
EMPLOYEE

2 years ago

file_get_contents(/var/www/scomputacion/.env): Failed to open stream: No such file or directory

brody
EMPLOYEE

2 years ago

i think it would be beneficial if you where to also look at the build logs when something fails


Anonymous
TRIALOP

2 years ago

I see them from the page but from that file I can't find where the error is reported


Anonymous
TRIALOP

2 years ago

chown -R www-data:www-data /var/www/scomputacion/public
chown -R www-data:www-data /var/www/scomputacion/storage/ /var/www/scomputacion/bootstrap/
ln -s /var/www/scomputacion/public /var/www/html

I think I should add that to the dockerfile as well.


brody
EMPLOYEE

2 years ago

your code should not be trying to load a .env file


Anonymous
TRIALOP

2 years ago

Now I had a problem, I tried to raise it again but it won't let me because the tables are trying to be created again because in the previous deployement that line worked, how can I delete the database?


brody
EMPLOYEE

2 years ago

you would need to have the migration command do nothing if the migrations have already been ran


Anonymous
TRIALOP

2 years ago

Ok, but one question I have. Does the system have to stay on all the time? That is, it never stops? I thought you could choose to turn it off and on whenever you want, but if every time I turn it on it has to generate the dockerfile I think it will be a problem


brody
EMPLOYEE

2 years ago

you want app sleeping?


Anonymous
TRIALOP

2 years ago

The app is probably used once a week, to upload orders. We want to do a one-month trial to check that the system works correctly but the free trial does not allow you to have the system running for the entire month, the monthly hours are limited, we thought it could be turned off and on so that it does not consume hours


brody
EMPLOYEE

2 years ago

theres no hour limit on the trial plan??


brody
EMPLOYEE

2 years ago

the only limit is the amount of resources and the trial credits you got


Anonymous
TRIALOP

2 years ago

So I was misinformed. I had read that you could only keep it on a certain number of hours per month.


brody
EMPLOYEE

2 years ago

indeed, no time limit, only credit and resource limit


brody
EMPLOYEE

2 years ago

but you could run out of resources before the end of the month, i dont know how much resources your app and database will use


Anonymous
TRIALOP

2 years ago

1231735675435614500


Anonymous
TRIALOP

2 years ago

I have to put the permission commands. In theory it worked but that's what I get


brody
EMPLOYEE

2 years ago

put them in the start command then


Anonymous
TRIALOP

2 years ago

i put this #Permisoschown -R www-data:www-data /var/www/scomputacion/public
RUN chown -R www-data:www-data /var/www/scomputacion/public
RUN chown -R www-data:www-data /var/www/scomputacion/storage/ /var/www/scomputacion/bootstrap/
RUN ln -s /var/www/scomputacion/public /var/www/html
but keeps :/


brody
EMPLOYEE

2 years ago

^


Anonymous
TRIALOP

2 years ago

chown -R www-data:www-data /var/www/scomputacion/public && chown -R www-data:www-data /var/www/scomputacion/storage/ /var/www/scomputacion/bootstrap/ && ln -s /var/www/scomputacion/public /var/www/html


Anonymous
TRIALOP

2 years ago

1231739519431344000


brody
EMPLOYEE

2 years ago

in your dockerfile


Anonymous
TRIALOP

2 years ago

this is in the dockerfile


Anonymous
TRIALOP

2 years ago

1231739810348142600


brody
EMPLOYEE

2 years ago

as the start command, not RUN


Anonymous
TRIALOP

2 years ago

like this?

1231740660562788400


brody
EMPLOYEE

2 years ago

no


brody
EMPLOYEE

2 years ago

the start command in a dockerfile is equivalent to the last CMD


Anonymous
TRIALOP

2 years ago

1231741345987563500


brody
EMPLOYEE

2 years ago

please try your best to read my messages so that i can avoid repeating myself


Anonymous
TRIALOP

2 years ago

i did this but the error keeps

1231745113294901200


brody
EMPLOYEE

2 years ago

^


Loading...