Update Dockerfile + docs

This commit is contained in:
Ari Timonen 2020-03-21 22:32:48 +02:00
parent b1b39e42a8
commit 86d098b74d
4 changed files with 12 additions and 6 deletions

View file

@ -2,6 +2,13 @@
Install instructions in INSTALL.md
1. Everything should be running on containers.
1. If you need to run stuff on your host (eg. ruby, rubocop, bundle install etc) run all commands from the: `Dockerfile.dev`. It should setup identical setup for your machine.
1. Add docker container names to /etc/hosts. This makes it possible to run test from local machine without using the container since editor/IDE don't integrate with Docker so well.
sudo echo `docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ensl_dev_db` db >> /etc/hosts
1. To run VS Code plugin Ruby Test Explorer in docker container you need to create path to custom
This is just random tips for development. Not a full documentation.
# Handy commands

View file

@ -1,4 +1,4 @@
FROM ruby:2.4.9
FROM ruby:2.5.7
ENV RAILS_ENV production

View file

@ -2,7 +2,7 @@
ENSL Website is fairly easy to run.
## 1. Install docker and docker-compose
## 1. Install requirements: docker, docker-compose and git
https://docs.docker.com/install/
https://docs.docker.com/compose/install/
@ -12,9 +12,7 @@ Install docker + docker-compose:
wget -O - 'https://get.docker.com/'|bash
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
## 2. Install git
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Install git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
sudo apt-get install nginx
@ -36,7 +34,7 @@ Finally, Start the docker containers.
docker-compose build
docker-compose --rm up
## 4. Install reverse proxy
## 4. Install reverse proxy (production only)
Install apache, nginx etc. reverse proxy. It will take requests from the users and pass them to ENSL website. Sample configuration availble @ ext/nginx.

View file

@ -83,6 +83,7 @@ services:
#tty: true
command: mysqld_safe --skip-grant-tables
image: mariadb:latest
container_name: ensl_dev_db
volumes:
- "./db_data:/var/lib/mysql"
- "./ext/mysql.conf.d:/etc/mysql/conf.d"