Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schedules
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Khalid Ali
schedules
Commits
1b2223e1
Commit
1b2223e1
authored
Aug 31, 2018
by
Nicholas J Anderson
Committed by
Zac Wood
Aug 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docker build in CI, use nginx for 'web' image
parent
df77d0e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
6 deletions
+62
-6
.gitlab-ci.yml
.gitlab-ci.yml
+28
-1
docker-cloud.yml
docker-cloud.yml
+28
-0
schedules_api/Dockerfile
schedules_api/Dockerfile
+2
-0
schedules_web/Dockerfile
schedules_web/Dockerfile
+4
-5
No files found.
.gitlab-ci.yml
View file @
1b2223e1
stages
:
stages
:
-
test
-
test
-
build
test_api
:
test_api
:
image
:
ruby:2.5
image
:
ruby:2.5
...
@@ -16,4 +17,30 @@ test_web:
...
@@ -16,4 +17,30 @@ test_web:
script
:
script
:
-
cd schedules_web
-
cd schedules_web
-
yarn
-
yarn
-
yarn build
-
yarn build
\ No newline at end of file
build_web
:
stage
:
build
retry
:
2
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
mkdir -p /root/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR/schedules_web --dockerfile $CI_PROJECT_DIR/schedules_web/Dockerfile --destination $CI_REGISTRY_IMAGE/web:$CI_COMMIT_TAG
only
:
-
tags
build_api
:
stage
:
build
retry
:
2
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
mkdir -p /root/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR/schedules_api --dockerfile $CI_PROJECT_DIR/schedules_api/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG
only
:
-
tags
docker-cloud.yml
0 → 100644
View file @
1b2223e1
version
:
"
3.3"
volumes
:
dbdata
:
configs
:
nginx_conf
:
file
:
./schedules_web/nginx.conf
networks
:
front
:
back
:
services
:
api
:
image
:
registry.srct.gmu.edu/srct/schedules/api:0.1.0
networks
:
back
:
web
:
image
:
registry.srct.gmu.edu/srct/schedules/web:0.1.0
networks
:
front
:
back
:
volumes
:
-
./schedules_web:/web
ports
:
-
8085:80
schedules_api/Dockerfile
View file @
1b2223e1
...
@@ -6,6 +6,8 @@ ADD . /api
...
@@ -6,6 +6,8 @@ ADD . /api
EXPOSE
3000
EXPOSE
3000
ENV
RAILS_ENV production
RUN
bundle
install
RUN
bundle
install
RUN
rails db:migrate
RUN
rails db:migrate
RUN
rails db:seed
RUN
rails db:seed
schedules_web/Dockerfile
View file @
1b2223e1
FROM
node:9
FROM
node:9
RUN
mkdir
/web
COPY
.
/web
WORKDIR
/web
WORKDIR
/web
ADD
. /web
EXPOSE
8080
RUN
yarn
install
&&
yarn run build
RUN
yarn
FROM
nginx:1.15.0
RUN
yarn build
COPY
--from=0 /web/dist /web
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment