Jonathan Rosenbaum
7 years ago
3 changed files with 46 additions and 4 deletions
@ -1,4 +0,0 @@ |
|||
[program:bike-database] |
|||
directory=/bike-database |
|||
command=rails server -b 0.0.0.0 -p 3000 |
|||
autorestart=true |
@ -0,0 +1,33 @@ |
|||
version: '2' |
|||
|
|||
# git clone https://github.com/Loos/bike-database.git |
|||
# docker-compose run -w /app vtracklery2 env |
|||
|
|||
# You can visit http://vtracklery.wvcompletestreets.org/api/workers/ and observe json data: user: admin password: password |
|||
|
|||
services: |
|||
bike-database: |
|||
container_name: bike-database |
|||
build: . |
|||
network_mode: "bridge" |
|||
restart: always |
|||
volumes: |
|||
- data:/app/db |
|||
expose: |
|||
- "3000" |
|||
command: bundle exec rails s -b 0.0.0.0 -p 3000 |
|||
environment: |
|||
- PORT=3000 |
|||
- VIRTUAL_HOST=bike-database.bikelover.org |
|||
- VIRTUAL_PORT=3000 |
|||
- LETSENCRYPT_HOST=bike-database.bikelover.org |
|||
- LETSENCRYPT_EMAIL="bike@bikelover.org" |
|||
logging: |
|||
driver: "json-file" |
|||
options: |
|||
max-size: "10m" |
|||
max-file: "3" |
|||
|
|||
volumes: |
|||
data: |
|||
|
@ -0,0 +1,13 @@ |
|||
require "bcrypt" |
|||
salt = BCrypt::Engine.generate_salt |
|||
encrypted_password = BCrypt::Engine.hash_secret('password', salt) |
|||
|
|||
User.create!(:email => "bike@bikelover.org", :encrypted_password => encrypted_pa |
|||
ssword).save(validate: false); |
|||
|
|||
Bike.create!(log_number: 1, brand: "Schwinn", model: "Paramount", bike_type: "Ro |
|||
ad", color: "Radiant Coppertone", purpose: "Sale", price: 300, serial_number: "2 |
|||
2bikebike22") |
|||
Bike.create!(log_number: 2, brand: "Schwinn", model: "Paramount", bike_type: " |
|||
Road", color: "Flamboyant Lime", purpose: "Freecyclery", serial_number: "33bikeb |
|||
ike33") |
Loading…
Reference in new issue