Update docs and compose files

This commit is contained in:
Ari Timonen 2020-11-14 10:09:59 +02:00
parent 27e5d41aa4
commit 1e7c377659
6 changed files with 22 additions and 15 deletions

1
.gitignore vendored
View file

@ -10,6 +10,7 @@
.env*.local .env*.local
.tmp* .tmp*
.rspec .rspec
test*.log
# Cache files # Cache files
.sass-cache .sass-cache

View file

@ -1,6 +1,6 @@
# Development # Development
Install instructions in INSTALL.md. Read this whole documentation before proceeding. Install instructions in INSTALL.md. Read it before proceeding.
## Basic commands for development ## Basic commands for development
@ -8,9 +8,9 @@ Load env variables (**don't skip this step**):
source script/env.sh .env .env.development source script/env.sh .env .env.development
Start: Start development:
docker-compose up --build development` docker-compose up --build development
Build or rebuild: Build or rebuild:
@ -33,10 +33,11 @@ Restart the web container
Run some tests: Run some tests:
docker-compose up --build test
docker-compose exec -u web test bundle exec rspec` docker-compose exec -u web test bundle exec rspec`
docker-compose exec -u web test bundle exec rspec spec/controllers/shoutmsgs_controller_spec.rb` docker-compose exec -u web test bundle exec rspec spec/controllers/shoutmsgs_controller_spec.rb`
## Unresolved issues for dev ## Unresolved issues for development
There are some unresolved issues to setup dev env. There are some unresolved issues to setup dev env.
@ -75,7 +76,7 @@ Read this to understand design decisions and follow them!
1. Env variables should be used everywhere and loaded from .env* files using Dotenv 1. Env variables should be used everywhere and loaded from .env* files using Dotenv
* Load order is in [here]|(https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use) * Load order is in [here]|(https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use)
* Local changes go to .env*local and NOT .env * Local changes go to .env*local and **not** .env
* Passwords are in ENV variables for now so they don't have to duplicated between DB and Rails. * Passwords are in ENV variables for now so they don't have to duplicated between DB and Rails.
1. Everything should be running on containers. 1. Everything should be running on containers.
* Docker-compose is the heart of deployment * Docker-compose is the heart of deployment
@ -85,10 +86,10 @@ Read this to understand design decisions and follow them!
* For production or staging could have the content in either image or as a volume. Doesn't really matter. * For production or staging could have the content in either image or as a volume. Doesn't really matter.
1. The public directory contains everything public. NGINX will try to find files there and ask from PUMA if it doesn't. 1. The public directory contains everything public. NGINX will try to find files there and ask from PUMA if it doesn't.
* The local public directories (images, files, icons, avatars etc.) are to be addeed to .gitignore * The local public directories (images, files, icons, avatars etc.) are to be addeed to .gitignore
* Assets are compiled on-fly in development mode. * Assets are compiled on-fly in development mode.
* In production/staging etc. assets are precompiled and stored. Entry script can do this. * In production/staging etc. assets are precompiled and stored. Entry script can do this.
* The public folder is a mix of auto-generated data (assets), static data (images) and user-generated data (avatars/files etc.). * The public folder is a mix of auto-generated data (assets), static data (images) and user-generated data (avatars/files etc.).
* No app folder in repo outside public is supposed to shared by webserver. * No app folder in repo outside public is supposed to be shared by webserver.
1. Do not comment out tests that are taken out of use temporarily but use **skip** 1. Do not comment out tests that are taken out of use temporarily but use **skip**
## Tags in code ## Tags in code

View file

@ -6,7 +6,11 @@
This is the source code of ENSL website. Currently deployed on [ensl.org](https://www.ensl.org). This is the source code of ENSL website. Currently deployed on [ensl.org](https://www.ensl.org).
Features: ## Documentation
See [[INSTALL.md]] how to install and [[DEVELOPMENT.md]] how to develop it.
## Features
- Articles - Articles
- Commenting feature for most objects - Commenting feature for most objects

View file

@ -0,0 +1,6 @@
version: "3.4"
networks:
default:
external:
name: catpack_docker

View file

@ -196,8 +196,3 @@ services:
# commands, but it is necessary for "spring status" and "spring stop" # commands, but it is necessary for "spring status" and "spring stop"
# to work properly. # to work properly.
# pid: host # pid: host
networks:
default:
external:
name: catpack_docker

View file

@ -43,8 +43,8 @@ Capybara.register_driver :selenium_remote do |app|
end end
Capybara.default_max_wait_time = 8 Capybara.default_max_wait_time = 8
#Capybara.javascript_driver = :selenium # Capybara.javascript_driver = :selenium
#Capybara.javascript_driver = :selenium_remote # Capybara.javascript_driver = :selenium_remote
#print('selenium %s' % SELENIUM_HOST) #print('selenium %s' % SELENIUM_HOST)
#print('port %d' % [TEST_APP_PORT]) #print('port %d' % [TEST_APP_PORT])