mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 03:58:49 +01:00
commit
9b0a88214c
5 changed files with 37 additions and 89 deletions
31
CONTRIBUTING.md
Normal file
31
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Contributing
|
||||
All contributions are welcome.
|
||||
|
||||
There are different ways in which you can contribute to Tracks.
|
||||
|
||||
## Documentation
|
||||
You can contribute documentation in the [wiki](https://github.com/TracksApp/tracks/wiki).
|
||||
|
||||
For example:
|
||||
- tutorials on installing Tracks in various environments
|
||||
- tutorials on using Tracks (user manual)
|
||||
|
||||
## Issues
|
||||
If you think having found a problem with Tracks, first search in the [existing issues](https://github.com/TracksApp/tracks/issues). If you cannot find it, open a new issue and try providing information on your setup and what steps are needed to reproduce the problem.
|
||||
|
||||
## Enhancements
|
||||
It would be great to first discuss them on the [mailing list](https://groups.google.com/group/TracksApp) so you can figure out if it could be merged or not. You may use the wiki too to describe your change if it is too big for an email.
|
||||
|
||||
If you want to contribute an enhancement or a fix, you can:
|
||||
|
||||
1. [fork the project](https://help.github.com/articles/fork-a-repo)
|
||||
1. [create a topic branch](http://learn.github.com/p/branching.html).
|
||||
1. install [docker-compose](https://docs.docker.com/compose/)
|
||||
1. copy `app/config/site.yml.tmpl` to `app/config/site.yml` and customize as needed
|
||||
1. then with `./bin/setup` you will prepare for the first run
|
||||
1. start the server with `./script/server` which will start everything you need in Docker and present Tracks at [http://0.0.0.0:3000](http://0.0.0.0:3000)
|
||||
1. if you need, you can launch a Rails console with `./bin/rails c` (will run inside Docker)
|
||||
1. make your changes and add/update relevant tests
|
||||
1. run the test suite with `./bin/rake test` (will run inside Docker)
|
||||
1. commit the changes
|
||||
1. send a pull request.
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
FROM phusion/passenger-ruby22:0.9.18
|
||||
|
||||
WORKDIR /home/app/tracks
|
||||
|
||||
# Install gems
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
RUN bundle install --without development test mysql therubyracer --jobs=3
|
||||
|
||||
# Install and configure the app
|
||||
ENV RAILS_ENV=production
|
||||
ENV DATABASE_URL=sqlite3:/var/tracks/database.sqlite3
|
||||
RUN mkdir /var/tracks && chmod 777 /var/tracks
|
||||
RUN touch /var/tracks/database.sqlite3 && chown app.app /var/tracks/database.sqlite3
|
||||
COPY . ./
|
||||
COPY config/site.yml.tmpl /etc/tracks/config/site.yml
|
||||
RUN ln -sf /etc/tracks/config/site.yml config/site.yml
|
||||
RUN bundle exec rake assets:precompile
|
||||
RUN chown -R app.app .
|
||||
|
||||
# Configure nginx
|
||||
RUN echo "env DATABASE_URL;" > /etc/nginx/main.d/env.conf
|
||||
RUN echo "\
|
||||
server {\n\
|
||||
listen 80 default_server;\n\
|
||||
server_name _;\n\
|
||||
root /home/app/tracks/public;\n\
|
||||
passenger_enabled on;\n\
|
||||
passenger_user app;\n\
|
||||
passenger_ruby /usr/bin/ruby2.2;\n\
|
||||
}" > /etc/nginx/sites-enabled/tracks.conf
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
RUN rm -f /etc/service/nginx/down
|
||||
|
||||
# Migrate the database on startup
|
||||
RUN echo "#!/bin/sh\nbundle exec rake db:migrate" > /etc/my_init.d/90_tracks.sh
|
||||
RUN chmod +x /etc/my_init.d/90_tracks.sh
|
||||
|
||||
VOLUME ["/etc/tracks", "/var/tracks"]
|
||||
|
||||
# Default command for baseimage-docker
|
||||
CMD ["/sbin/my_init"]
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
1. Resources
|
||||
|
||||
Tracks is using
|
||||
* GitHub to host the git repository, manage git pull requests, and manage bugs and enhancement requests.
|
||||
* the mailing list to discuss features and development and interact with users
|
||||
|
||||
See README for links to the respective sites
|
||||
|
||||
Also see the Development pages on the wiki for details on installing, testing,
|
||||
upgrading, etc.
|
||||
|
||||
2. Dependencies
|
||||
|
||||
The dependencies for Tracks are maintained using bundler. Before starting your
|
||||
tracks instance, you'll need to run 'bundle install' to fetch all the
|
||||
dependencies
|
||||
|
||||
3. Testing
|
||||
|
||||
There are some pointers for setting up your Tracks copy for testing at
|
||||
https://github.com/TracksApp/tracks/wiki/Testing/
|
||||
|
||||
By default, tests are configured to run using sqlite3 in memory mode to
|
||||
increase speed. You will need the sqlite3-ruby gem for this.
|
||||
|
||||
To avoid showing the migrations as tests are run, add the following to your
|
||||
database.yml below 'database: ":memory:"':
|
||||
|
||||
verbosity: quiet
|
||||
|
||||
If you want to run tests using another database, that's fine, too. Just change
|
||||
your database.yml accordingly.
|
||||
|
||||
Running cucumber/selenium tests in :memory mode does not seem to work.
|
||||
|
||||
The rspec tests are not actively maintained.
|
||||
|
||||
See the wiki for more information on testing:
|
||||
https://github.com/TracksApp/tracks/wiki/Testing
|
||||
|
||||
4. Contributing
|
||||
|
||||
See https://github.com/TracksApp/tracks/wiki/How-to-contribute
|
||||
|
|
@ -3,17 +3,17 @@ services:
|
|||
db:
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: '1'
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 1
|
||||
MYSQL_DATABASE: ${TRACKS_DB:-tracks}
|
||||
volumes:
|
||||
- "db-data:/var/lib/mysql"
|
||||
- db-data:/var/lib/mysql
|
||||
web:
|
||||
build: .
|
||||
volumes:
|
||||
- "${VOLUME:-.:/app/workdir}"
|
||||
- ${VOLUME:-.:/app}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- 3000:3000
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
db-data:
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ function die() {
|
|||
trap cleanup EXIT
|
||||
|
||||
export RAILS_ENV=test
|
||||
export TRACKS_DB=tracks_test
|
||||
|
||||
# Put a config/site.yml file in place since it's needed for operation
|
||||
cp config/site.yml.tmpl config/site.yml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue