jucaesmanhoto / design-auctions

design-auctions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SETTING UP

First, if you don't have the Docker installed, you can do it clicking here - to open in a new tab, press CMD(Mac) or CTRL(Win) and click - download and install it. We'll need it to go further.

While you wait the download, let's create some aliases to help you with most repetitive commands

dexec() {
    docker exec -it $1 sh -c $2
}
alias ownership='sudo chown -R $USER:$USER .' # run it if you see a permission denied error
alias app-init='sh init.sh' # run to create the enviroment
alias app-start='sh start.sh' #  run every time you want to start the app.
                              # It will run migrations and gem or packegesinstalations

To run commands inside your container, you can run dexec, passing the container name as first parameter and the command at the end.

🚨 Alert: Don't forget the quotes!

Exemples:

dexec container-name 'rails db:create db:migrate db:seed'
dexec container-name 'rails c'

If you are running Docker on Linux, the files rails new created are owned by root. This happens because the container runs as the root user. If this is the case, after adding it to your zshrc, you can use this alias to change the ownership of the new files.

ownership

INITIALIZATION (Only first run)

Go to the directory you want to clone the project and run

git clone git@github.com:jucaesmanhoto/design-auctions.git

Navigate into the new directory

cd design-auctions

If the docker is installed, you can build the enviroment and create the development database by running

app-init

STARTING THE APP

Now, you can just run the app and start working :)

app-start

About

design-auctions


Languages

Language:Ruby 73.1%Language:HTML 19.9%Language:SCSS 3.9%Language:JavaScript 1.6%Language:Dockerfile 0.9%Language:Shell 0.6%