Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from Code for NL #1

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
12 changes: 12 additions & 0 deletions .rancher-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
stages:
- name: Publish
steps:
- publishImageConfig:
dockerfilePath: ./Dockerfile
buildContext: .
tag: pitchdeck:${CICD_EXECUTION_SEQUENCE}
- name: Deploy
steps:
- applyYamlConfig:
path: ./deployment.yaml
notification: {}
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ RUN apt-get update -y && \

COPY . /var/www/html

RUN mkdir /var/www/html/savedDecks

RUN chown -R www-data:www-data /var/www/html

COPY vhost.conf /etc/apache2/sites-enabled/000-default.conf

USER www-data

RUN composer install -d /var/www/html

VOLUME /var/www/html/savedDecks

USER root
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
https://guykawasaki.com/the-only-10-slides-you-need-in-your-pitch/

Code for NL styled version

<img src="screenshot.png" width="420"/>

## Run a development environment

```
docker build -t pitchdeck_dev_local:0.0.1 .
docker run -p 8080:80 pitchdeck_dev_local:0.0.1
```

You can then access the site at http://localhost:8080 and make changes in your local php files.

```
docker run -it -v "$PWD":/var/www/html -p 8080:80 pitchdeck_dev_local:0.0.1
```

To mount from the current directory
28 changes: 14 additions & 14 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ body {
font-size: 100%;
font-weight: 500;
font-family: "Open Sans", Arial;
background: #111;
color: #eee;
background: #fff;
color: #777876;
width: 100%;
height: 100%;
}
h1 {
font-size: 4em;
font-weight: 900;
color: #38d;
color: #71BF9D;
line-height: 1.4em;
max-width: 40em;
border-bottom: 2px solid #38d;
border-bottom: 2px solid #71BF9D;
margin: 100px;
}
p {
Expand All @@ -30,9 +30,9 @@ button.save {
right: 1em;
height: 4em;
width: 4em;
background: #38d;
background: #71BF9D;
border: 0;
color: #eee;
color: #fff;
cursor: pointer;
font-size: 1em;
font-family: "Open Sans", Arial;
Expand All @@ -56,10 +56,10 @@ button.save:focus {
display: block;
padding: 0.2em 0.5em;
text-align: center;
/*background: #38d;*/
background: #111;
/*background: #71BF9D;*/
background: #777876;
border: 0;
color: #eee;
color: #fff;
cursor: pointer;
font-size: 1em;
font-weight: 100;
Expand All @@ -78,14 +78,14 @@ footer {
text-align: right;
}
a {
color: #38d;
color: #71BF9D;
text-decoration: none;
}
h1 input {
border: 0;
font-size: 1em;
color: #38d;
background: #333;
color: #71BF9D;
background: #fff;
outline: none;
font-family: "Open Sans", Arial;
font-weight: 900;
Expand All @@ -96,8 +96,8 @@ p textarea {
outline: none;
font-family: "Open Sans", Arial;
width: 100%;
background: #222;
color: #eee;
background: #fff;
color: #777876;
height: 100%;
padding: 0;
min-height: 10em;
Expand Down
36 changes: 36 additions & 0 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
kind: Service
apiVersion: v1
metadata:
name: pitchdeck-service
spec:
selector:
app: pitchdeck
type: NodePort
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pitchdeck-deployment
labels:
app: pitchdeck
spec:
replicas: 1
selector:
matchLabels:
app: pitchdeck
template:
metadata:
labels:
app: pitchdeck
spec:
imagePullSecrets:
- name: pipeline-docker-registry
containers:
- name: pitchdeck
image: ${CICD_IMAGE}:${CICD_EXECUTION_SEQUENCE}
ports:
- containerPort: 80
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions vhost.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VirtualHost *:80>
DocumentRoot /var/www/html/public
DocumentRoot /var/www/html

<Directory "/var/www/html/public">
<Directory "/var/www/html">
AllowOverride All
</Directory>

Expand Down