Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mastofe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pleroma
mastofe
Commits
46fb634c
Commit
46fb634c
authored
8 years ago
by
Effy Elden
Browse files
Options
Downloads
Patches
Plain Diff
Improve Vagrantfile, load environment variables from .env.vagrant, always forward localhost:3000
parent
f1289ca3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Vagrantfile
+16
-6
16 additions, 6 deletions
Vagrantfile
with
16 additions
and
6 deletions
Vagrantfile
+
16
−
6
View file @
46fb634c
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script
=
<<
SCRIPT
$provision
=
<<
SCRIPT
cd /vagrant # This is where the host folder/repo is mounted
# Add repo for Ruby 2.3 binaries
...
...
@@ -52,6 +53,15 @@ bundle exec rails assets:precompile
SCRIPT
$start
=
<<
SCRIPT
cd /vagrant
export $(cat ".env.vagrant" | xargs)
killall ruby2.3
rails s -d -b 0.0.0.0
SCRIPT
VAGRANTFILE_API_VERSION
=
"2"
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
...
...
@@ -72,15 +82,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if
defined?
(
VagrantPlugins
::
HostsUpdater
)
config
.
vm
.
network
:private_network
,
ip:
"192.168.42.42"
config
.
hostsupdater
.
remove_on_suspend
=
false
else
# Otherwise, you can access the site at http://localhost:3000
config
.
vm
.
network
:forwarded_port
,
guest:
80
,
host:
3000
end
# Otherwise, you can access the site at http://localhost:3000
config
.
vm
.
network
:forwarded_port
,
guest:
80
,
host:
3000
# Full provisioning script, only runs on first 'vagrant up' or with 'vagrant provision'
config
.
vm
.
provision
:shell
,
inline:
$
script
,
privileged:
false
config
.
vm
.
provision
:shell
,
inline:
$
provision
,
privileged:
false
# Start up script, runs on every 'vagrant up'
config
.
vm
.
provision
:shell
,
inline:
"cd /vagrant && rails s -d -b 0.0.0.0"
,
run:
'always'
,
privileged:
false
config
.
vm
.
provision
:shell
,
inline:
$start
,
run:
'always'
,
privileged:
false
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment