Skip to content

Commit 0a2ee6b

Browse files
committed
Initial commit
0 parents  commit 0a2ee6b

File tree

15 files changed

+504
-0
lines changed

15 files changed

+504
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.vagrant

Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM abevoelker/ruby
2+
MAINTAINER Abe Voelker <abe@abevoelker.com>
3+
4+
# Set up application user 'openproject' and check out source
5+
RUN adduser openproject --home /home/openproject --shell /bin/bash --disabled-password --gecos "" &&\
6+
mkdir -p /var/www/openproject &&\
7+
git clone https://github.com/opf/openproject.git -b stable --single-branch /var/www/openproject &&\
8+
mkdir -p /var/www/openproject/docker/scripts
9+
10+
COPY Gemfile.local /var/www/openproject/
11+
12+
RUN chown -R openproject:openproject /var/www/openproject
13+
14+
USER openproject
15+
16+
RUN cd /var/www/openproject &&\
17+
bundle install --without mysql mysql2 sqlite development test rmagick --path vendor/bundle
18+
19+
USER root
20+
21+
COPY database.yml /var/www/openproject/config/
22+
COPY configuration.yml /var/www/openproject/config/
23+
COPY scripts /var/www/openproject/docker/scripts
24+
25+
RUN chown -R openproject:openproject /var/www/openproject &&\
26+
chmod u+x /var/www/openproject/docker/scripts/*.sh
27+
28+
# Add nginx configuration
29+
ADD nginx/nginx.conf /etc/nginx/
30+
ADD nginx/sites-available/openproject.conf /etc/nginx/sites-available/
31+
RUN chown -R openproject:openproject /etc/nginx/sites-available &&\
32+
chown -R openproject:openproject /etc/nginx/sites-enabled &&\
33+
cd /etc/nginx/sites-enabled &&\
34+
rm default &&\
35+
ln -s ../sites-available/openproject.conf
36+
37+
# Add supervisord configs
38+
ADD supervisord/rails.conf /etc/supervisor/conf.d/
39+
ADD supervisord/nginx.conf /etc/supervisor/conf.d/
40+
41+
CMD ["/var/www/openproject/docker/scripts/run_rails.sh"]

Gemfile.local

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
group :production do
2+
gem 'puma'
3+
end

Vagrantfile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5+
VAGRANTFILE_API_VERSION = "2"
6+
7+
ENV['VAGRANT_DEFAULT_PROVIDER'] ||= 'docker'
8+
9+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
10+
config.vm.define "postgres" do |postgres|
11+
postgres.vm.provider 'docker' do |d|
12+
d.image = 'paintedfox/postgresql'
13+
d.name = 'openproject_postgres'
14+
d.env = {
15+
'USER' => 'super',
16+
'PASS' => 'password'
17+
}
18+
end
19+
end
20+
21+
config.vm.define "memcached" do |memcached|
22+
memcached.vm.provider 'docker' do |d|
23+
d.image = 'tutum/memcached'
24+
d.name = 'openproject_memcached'
25+
d.env = {
26+
'MEMCACHED_PASS' => 'password'
27+
}
28+
end
29+
end
30+
31+
config.vm.define "openproject" do |openproject|
32+
openproject.vm.provider 'docker' do |d|
33+
d.image = 'abevoelker/openproject'
34+
d.name = 'openproject'
35+
d.cmd = ['/var/www/openproject/docker/scripts/run_rails.sh']
36+
37+
d.link('openproject_postgres:postgres')
38+
d.link('openproject_memcached:memcached')
39+
end
40+
end
41+
42+
config.vm.define "openproject_delayed_job" do |openproject|
43+
openproject.vm.provider 'docker' do |d|
44+
d.image = 'abevoelker/openproject'
45+
d.name = 'openproject_delayed_job'
46+
d.cmd = ['/var/www/openproject/docker/scripts/run_background_job.sh']
47+
48+
d.link('openproject_postgres:postgres')
49+
d.link('openproject_memcached:memcached')
50+
end
51+
end
52+
end

configuration.yml

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
#-- copyright
2+
# OpenProject is a project management system.
3+
# Copyright (C) 2012-2014 the OpenProject Foundation (OPF)
4+
#
5+
# This program is free software; you can redistribute it and/or
6+
# modify it under the terms of the GNU General Public License version 3.
7+
#
8+
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
9+
# Copyright (C) 2006-2013 Jean-Philippe Lang
10+
# Copyright (C) 2010-2013 the ChiliProject Team
11+
#
12+
# This program is free software; you can redistribute it and/or
13+
# modify it under the terms of the GNU General Public License
14+
# as published by the Free Software Foundation; either version 2
15+
# of the License, or (at your option) any later version.
16+
#
17+
# This program is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with this program; if not, write to the Free Software
24+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25+
#
26+
# See doc/COPYRIGHT.rdoc for more details.
27+
#++
28+
29+
# = OpenProject configuration file
30+
#
31+
# Each environment has it's own configuration options. If you are only
32+
# running in production, only the production block needs to be configured.
33+
# Environment specific configuration options override the default ones.
34+
#
35+
# Note that this file needs to be a valid YAML file.
36+
#
37+
# Instead of using a configuration.yml file, you can configure OpenProject via
38+
# environment variables. See doc/CONFIGURATION.md for more information.
39+
#
40+
#
41+
# == Outgoing email settings (email_delivery setting)
42+
#
43+
# === Common configurations
44+
#
45+
# ==== Sendmail command
46+
#
47+
# production:
48+
# email_delivery_method: :sendmail
49+
#
50+
# ==== Simple SMTP server at localhost
51+
#
52+
# production:
53+
# email_delivery_method: "smtp"
54+
# smtp_address: "localhost"
55+
# smtp_port: 25
56+
#
57+
# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
58+
#
59+
# production:
60+
# email_delivery_method: "smtp"
61+
# smtp_address: "example.com"
62+
# smtp_port: 25
63+
# smtp_authentication: :login
64+
# smtp_domain: 'foo.com'
65+
# smtp_user_name: 'myaccount'
66+
# smtp_password: 'password'
67+
#
68+
# ==== SMTP server at example.com using PLAIN authentication
69+
#
70+
# production:
71+
# email_delivery_method: "smtp"
72+
# smtp_address: "example.com"
73+
# smtp_port: 25
74+
# smtp_authentication: :plain
75+
# smtp_domain: 'example.com'
76+
# smtp_user_name: 'myaccount'
77+
# smtp_password: 'password'
78+
#
79+
# ==== SMTP server at using TLS (GMail)
80+
#
81+
# This requires some additional configuration. See the article at:
82+
# http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/
83+
#
84+
# production:
85+
# email_delivery_method: "smtp"
86+
# smtp_enable_starttls_auto: true
87+
# smtp_address: "smtp.gmail.com"
88+
# smtp_port: 587
89+
# smtp_domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
90+
# smtp_authentication: :plain
91+
# smtp_user_name: "your_email@gmail.com"
92+
# smtp_password: "your_password"
93+
#
94+
#
95+
# === More configuration options
96+
#
97+
# See following page:
98+
#
99+
# http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
100+
101+
102+
# default configuration options for all environments
103+
default:
104+
# Outgoing emails configuration (see examples above)
105+
email_delivery_method: :smtp
106+
smtp_address: smtp.example.net
107+
smtp_port: 25
108+
smtp_domain: example.net
109+
smtp_authentication: :login
110+
smtp_user_name: "openproject@example.net"
111+
smtp_password: "my_openproject_password"
112+
113+
# Prefix to the url-path. This path is then prepended to all
114+
# the routes and is used to correclty identify the path to the assets.
115+
# Defaults to having no prefix.
116+
# Examples:
117+
# For OpenProject to be reachable as
118+
# https://example.org/open_project
119+
# the setting has o be:
120+
# rails_relative_url_root: "/open_project"
121+
#
122+
# rails_relative_url_root: ""
123+
124+
# Absolute path to the directory where attachments are stored.
125+
# The default is the 'files' directory in your OpenProject instance.
126+
# Your OpenProject instance needs to have write permission on this
127+
# directory.
128+
# Examples:
129+
# attachments_storage_path: /var/openproject/files
130+
# attachments_storage_path:
131+
132+
# Configuration of the autologin cookie.
133+
# autologin_cookie_name: the name of the cookie (default: autologin)
134+
# autologin_cookie_path: the cookie path (default: /)
135+
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
136+
# autologin_cookie_name:
137+
# autologin_cookie_path:
138+
# autologin_cookie_secure:
139+
140+
# disable browser cache for security reasons
141+
# see: https://websecuritytool.codeplex.com/wikipage?title=Checks#http-cache-control-header-no-store
142+
# disable_browser_cache: true
143+
144+
# use memcache for performance, memcached must be installed
145+
#rails_cache_store: :memcache
146+
147+
# defines where session data is stored
148+
# possible values are :cookie_store, :cache_store, :active_record_store
149+
session_store: :cache_store
150+
151+
# Configuration of SCM executable command.
152+
# Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
153+
# On Windows, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
154+
# Examples:
155+
# scm_subversion_command: svn # (default: svn)
156+
# scm_git_command: /usr/local/bin/git # (default: git)
157+
# scm_subversion_command:
158+
# scm_git_command:
159+
160+
# Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
161+
# If you don't want to enable data encryption, just leave it blank.
162+
# WARNING: losing/changing this key will make encrypted data unreadable.
163+
#
164+
# If you want to encrypt existing passwords in your database:
165+
# * set the cipher key here in your configuration file
166+
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
167+
#
168+
# If you have encrypted data and want to change this key, you have to:
169+
# * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
170+
# * change the cipher key here in your configuration file
171+
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
172+
# database_cipher_key:
173+
#
174+
# Omniauth direct login:
175+
#
176+
# Per default the user may choose the usual password login as well as several omniauth providers
177+
# on the login page and in the login drop down menu.
178+
#
179+
# With his configuration option you can set a specific omniauth provider to be
180+
# used for direct login. Meaning that the login provider selection is skipped and
181+
# the configured provider is used directly instead.
182+
#
183+
# If this option is active /login will lead directly to the configured omniauth provider
184+
# and so will a click on 'Sign in' (as opposed to opening the drop down menu).
185+
#
186+
# Note that this does not stop a user from manually navigating to any other
187+
# omniauth provider if additional ones are configured.
188+
# omniauth_direct_login_provider: developer
189+
#
190+
# disable_password_login: true
191+
192+
# specific configuration options for production environment
193+
# that overrides the default ones
194+
# production:
195+
196+
# specific configuration options for development environment
197+
# that overrides the default ones
198+
development:
199+
email_delivery_method: :letter_opener
200+
201+
# Configuration for the test environment
202+
test:
203+
email_delivery_method: :test

database.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
production:
2+
adapter: postgresql
3+
database: openproject
4+
host: <%= ENV['POSTGRES_PORT_5432_TCP_ADDR'] %>
5+
username: openproject
6+
password: <%= ENV['POSTGRES_ENV_PASS'] %>
7+
encoding: utf8

0 commit comments

Comments
 (0)