DEV Community

Discussion on: Installing Forem/Dev using Docker on Ubuntu

Collapse
 
sohahm profile image
Sohail Ahmed

Can I use this method to run a production instance or would you suggest another way?

Collapse
 
akhilnaidu profile image
Akhil Naidu

It is always better to have 2 different instances one in local (development) and the other to the public through the production (in Heroku or VPS)

Also, remember, unlike the development forem instance to have a working production instance you have to configure all most all the environment variable in the .env file.

Collapse
 
sohahm profile image
Sohail Ahmed

I would like to deploy it in production and I understand that I need to copy .env_sample as .env and add values but what about docker-compose.yml? It has RAILS_ENV, DATABASE_URL, and many things set as development. Do I have to modify it as well?

Please advise. Thank you.

Thread Thread
 
akhilnaidu profile image
Akhil Naidu

No need to modify system-oriented variables, by default in a system like Heroku the environmental variables of rails are configured as production. All you have to do is configure .env file.

Also just having a .env is not sufficient, you need to configure everything in it. Take for example the Cloudinary, Honey badger, Fastly, Pusher, Honeycomb, AWS.. All of them have to be configured.

Collapse
 
sohahm profile image
Sohail Ahmed • Edited

Yes, thank you. I will install and get back to you if there is anymore questions.

By the way, I used apt install docker-compose to install Docker Compose.

Thread Thread
 
akhilnaidu profile image
Akhil Naidu

Usually installing in such a way is not a problem, but downloading source code and installing it manually never, usually, results in an error.

Also, I would like to know if you have a successful forem production instance. If possible just ping me here, if you have one.