Compare commits
5 Commits
master
...
lz1irq/doc
Author | SHA1 | Date |
---|---|---|
Ivaylo Markov | 428bfb9639 | |
Ivaylo Markov | d718850253 | |
Ivaylo Markov | 5ba2709a8e | |
Ivaylo Markov | 6386ae6db9 | |
Ivaylo Markov | 6bbd39dc23 |
|
@ -14,7 +14,6 @@
|
|||
# Ignore all logfiles and tempfiles.
|
||||
/log/*.log
|
||||
/tmp
|
||||
/config/database.yml
|
||||
/config/secrets.yml
|
||||
/db/schema.rb
|
||||
/erd.pdf
|
||||
|
|
12
README.md
12
README.md
|
@ -8,4 +8,14 @@ Installation
|
|||
|
||||
1. `git clone https://github.com/ignisf/clarion.git`
|
||||
2. Run `bundle install; bin/rake bootstrap`
|
||||
3. You can now run the rails server with `bin/rails s`
|
||||
3. You can now run the rails server with `bin/rails s`
|
||||
|
||||
Usage with Docker
|
||||
-----------------
|
||||
|
||||
Requires [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/).
|
||||
|
||||
1. Run `git clone https://github.com/ignisf/clarion.git`.
|
||||
2. Run `docker-compose up --build --detach`.
|
||||
3. Add `127.0.0.1 clarion.openfest.test` to your system's host file.
|
||||
4. Open http://clarion.openfest.test:3000/management in your browser and log in with username `foo@example.com` and password `123qweASD`.
|
|
@ -20,10 +20,15 @@ default: &default
|
|||
# For details on connection pooling, see Rails configuration guide
|
||||
# http://guides.rubyonrails.org/configuring.html#database-pooling
|
||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
database: <%= ENV.fetch("POSTGRES_DB") { "clarion" } %>
|
||||
username: <%= ENV.fetch("POSTGRES_USER") { "clarion" } %>
|
||||
password: <%= ENV["POSTGRES_PASSWORD"] %>
|
||||
host: <%= ENV.fetch("POSTGRES_HOST") { "localhost" } %>
|
||||
port: <%= ENV.fetch("POSTGRES_PORT") { 5432 } %>
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: clarion_development
|
||||
database: <%= ENV.fetch("POSTGRES_DB") { "clarion_development" } %>
|
||||
|
||||
# The specified database role being used to connect to postgres.
|
||||
# To create additional roles in postgres see `$ createuser --help`.
|
|
@ -1,25 +0,0 @@
|
|||
# SQLite version 3.x
|
||||
# gem install sqlite3
|
||||
#
|
||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||
# gem 'sqlite3'
|
||||
#
|
||||
default: &default
|
||||
adapter: sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: db/development.sqlite3
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
<<: *default
|
||||
database: db/test.sqlite3
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
database: db/production.sqlite3
|
10
db/seeds.rb
10
db/seeds.rb
|
@ -10,3 +10,13 @@ User.create(email: "foo@example.com",
|
|||
password_confirmation: "123qweASD",
|
||||
confirmed_at: Time.current,
|
||||
admin: true)
|
||||
|
||||
Conference.create(
|
||||
title: "TestFest",
|
||||
email: "foo@example.com",
|
||||
host_name: "clarion.openfest.test",
|
||||
description: "Test Conference",
|
||||
start_date: Date.today,
|
||||
end_date: Date.today,
|
||||
planned_cfp_end_date: Date.today.prev_day
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ./docker/app
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- "./docker/dev.env"
|
||||
volumes:
|
||||
- ./:/clarion
|
||||
environment:
|
||||
- BUNDLE_PATH=./vendor
|
||||
working_dir: "/clarion"
|
||||
command: "./docker/app/run.sh"
|
||||
ports:
|
||||
- 127.0.0.1:3000:3000
|
||||
db:
|
||||
image: postgres:11.9
|
||||
volumes:
|
||||
- clarion-db:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- "./docker/dev.env"
|
||||
|
||||
volumes:
|
||||
clarion-db:
|
|
@ -0,0 +1,3 @@
|
|||
FROM ruby:2.6.5
|
||||
|
||||
RUN apt-get update && apt-get install -y postgresql-client
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Install dependencies
|
||||
bundle install
|
||||
|
||||
# DB migrations
|
||||
./bin/rails db:create
|
||||
./bin/rails db:migrate
|
||||
./bin/rails db:seed
|
||||
|
||||
# Remove leftover PID file from non-clean exit
|
||||
rm tmp/pids/server.pid
|
||||
./bin/rails server --binding=0.0.0.0
|
|
@ -0,0 +1,6 @@
|
|||
RAILS_ENV=development
|
||||
|
||||
POSTGRES_HOST=db
|
||||
POSTGRES_USER=clarion
|
||||
POSTGRES_PASSWORD=clarion
|
||||
POSTGRES_DB=clarion
|
Loading…
Reference in New Issue