Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
P
portal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
compositionalenterprises
portal
Commits
788107af
Commit
788107af
authored
3 years ago
by
AndrewCz
Browse files
Options
Downloads
Patches
Plain Diff
Completely untested rake task modifications
parent
6cc5d5a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!120
Allow portal to clone the env to disk
Pipeline
#294168442
passed
3 years ago
Stage: build
Stage: push
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.development
+7
-8
7 additions, 8 deletions
.env.development
config/storage.yml
+3
-0
3 additions, 0 deletions
config/storage.yml
docs/develop.md
+21
-0
21 additions, 0 deletions
docs/develop.md
lib/tasks/ansible_environment.rake
+20
-4
20 additions, 4 deletions
lib/tasks/ansible_environment.rake
with
51 additions
and
12 deletions
.env.development
+
7
−
8
View file @
788107af
DB_HOST=127.0.0.1
DB_NAME=skeleton
DB_USER=user
DB_PASS=password
EMAIL_HOST=localhost:3000
MG_API_KEY=skeleton
MG_DOMAIN=skeleton
\ No newline at end of file
export DB_HOST=127.0.0.1
export DB_NAME=skeleton
export DB_USER=user
export DB_PASS=password
export EMAIL_HOST=localhost:3000
export MG_API_KEY=skeleton
export MG_DOMAIN=skeleton
This diff is collapsed.
Click to expand it.
config/storage.yml
+
3
−
0
View file @
788107af
default
:
&default
service
:
Disk
root
:
<%= Rails.root.join("storage") %>
tmp
:
<%= Rails.root.join("tmp") %>
development
:
service
:
Disk
root
:
<%= Rails.root.join("storage") %>
tmp
:
<%= Rails.root.join("tmp") %>
local
:
service
:
Disk
root
:
<%= Rails.root.join("storage") %>
tmp
:
<%= Rails.root.join("tmp") %>
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
# amazon:
...
...
This diff is collapsed.
Click to expand it.
docs/develop.md
0 → 100644
+
21
−
0
View file @
788107af
# Manjaro
```
$ pamac install rvm docker docker-compose mariadb
$ systemctl -aG $USER docker
$ systemctl enable docker
$ systemctl reboot
$ source /usr/share/rvm/scripts/rvm
$ rvm install 2.7.0
$ bundle install
$ yarn install
$ source .env.development
$ docker-compose up -d --build
$ docker-compose down website
$ ./bin/webpack-server-dev
$ bundle exec rails s
```
# TODO
-
Sample keys
-
Fixed sign-up emails
This diff is collapsed.
Click to expand it.
lib/tasks/ansible_environment.rake
+
20
−
4
View file @
788107af
namespace
:ansible_environment
do
desc
"Checks to see if the dirs exist"
task
:clone_env
=>
:environment
do
setup_dirs
unless
setup_dirs
Rails
.
logger
.
error
"Could Not Set up dirs appropriately"
fail
"Could Not Set up dirs appropriately"
end
end
def
setup_dirs
...
...
@@ -22,10 +25,9 @@ namespace :ansible_environment do
# Test for git
unless
system
(
'which git'
)
Rails
.
logger
.
error
"Could not find 'git' executable in $PATH"
.
return
return
False
end
# Clone the master branch
# TODO: Environment is a controlled git repo. We'll need a read-only user to access it
# This means that we'll have to create an ourcomposebot_ro user and store creds
# and all that good stuff. We'll also be linked to the gitlab repo for the time
...
...
@@ -39,7 +41,21 @@ namespace :ansible_environment do
# branches (including their existance) to be private. Either that, or just a
# separate repo with the environment. That's what this comment seems to be pointing
# to: https://forum.gitlab.com/t/private-branch-public-repo/3136
#system('git clone ')
unless
ENV
[
'OURCOMPOSEBOT_RO_KEY'
].
blank?
#
# Clone the private repo with the RO bot user's creds
#
# Make the app-specific ssh keys dir
Dir
.
mkdir
Rails
.
application
.
config
.
storage
.
tmp
+
'/.ssh'
File
.
open
(
"
#{
Rails
.
application
.
config
.
storage
.
tmp
}
/.ssh/id_rsa"
,
'w+'
)
do
|
f
|
f
.
write
(
ENV
[
'OURCOMPOSEBOT_RO_KEY'
])
end
git_ssh_cmd
=
"GIT_SSH_COMMAND='ssh -i
#{
Rails
.
application
.
config
.
storage
.
tmp
}
/.ssh/id_rsa'"
system
(
"
#{
git_ssh_cmd
}
git clone https://gitlab.com/compositionalenterprises/environment.git
#{
Rails
.
application
.
config
.
storage
.
root
}
/ansible/environment"
)
else
# Clone the master branch of the template repo
system
(
"git clone https://gitlab.com/compositionalenterprises/template-environment.git
#{
Rails
.
application
.
config
.
storage
.
root
}
/ansible/environment"
)
end
end
end
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