Skip to content

This is a repository with the files and instructions to set the environment for nokoarts applications

Notifications You must be signed in to change notification settings

kevteg/docker-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker guide

This is a simple guide to use docker.

Δ Important

•This tutorial asumes that you have the dockerfile and docker-compose.yml inside the project folder

Install docker and docker-compose:

Installing docker:

Ubuntu and derivatives

Arch and derivatives

Installing docker-compose:

Unix

Δ Important

•It is necessary to start the docker daemon to use docker.

•You should add your user to the docker group in order to use it as a normal user (not sudo).

Download the project main image using the dockefile:

 $ docker build .  #Dont forget the dot! ;)

This will download all the requeriments for corottos web app . It might take a while

Δ Important

•It is necessary to run this inside the project folder with the **dockerfile** inside

After the image is downloaded you will see it within all the docker images you've download:

Docker images

Docker compose

Docker compose is a tool to run multi-container Docker applications.

Δ Important

•It is necessary to change the docker-compose.yml file. Change the working directory to yours

Pull down the postgres image through docker-compose:!

$ docker-compose up

After the postgres image is downloaded you will be able to run the app!

Creating the database:

To run any rails command you just need to use docker-compose:

 $ docker-compose run corottos rake db:create db:migrate

☞ To considerate:

•When adding a new gem to the gemfile just use docker-compose build to run bundle install

•There are some simple but necessary changes to make to the database.yml file (attached in the folder)

•Using prax is exactly the same thing as usual

Docker compose documentation

Docker documentation

Develop and have fun ♥

To run the app:

$ docker-compose up

Connecting to the database with pgadmin

It is really easy to connect! Just forward the ports in the docker-compose file: (already on example files)

db:
  image: postgres
  ports:
    - '0.0.0.0:5432:5432'
 ...

And connect to localhost/your_ip:5432 through pgadmin!

About

This is a repository with the files and instructions to set the environment for nokoarts applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published