Quellcode durchsuchen

rewrite the docker commands to use only one container (#94)

pull/107/head
Cian Butler vor 1 Jahr
committed by GitHub
Ursprung
Commit
8a77ee01cc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 25 neuen und 29 gelöschten Zeilen
  1. +23
    -17
      README.md
  2. +2
    -12
      docker-compose.yml

+ 23
- 17
README.md Datei anzeigen

@@ -1,14 +1,15 @@
# TechWeek Website

[![CircleCI](https://circleci.com/gh/redbrick/TechWeek.svg?style=svg)](https://circleci.com/gh/redbrick/TechWeek)
---
This repository contains the Techweek website
The website was written to have the Google Material Design look and feel. MaterializeCSS was used to speed up the process.
The website was written to have the Google Material Design look and feel.
MaterializeCSS was used to speed up the process.

## Deployment

To deploy to a server just run from the parent of of the folder you want to deploy too.
_example writen assuming folder deployed is techweek/dist_
To deploy to a server just run from the parent of of the folder you want to
deploy too. _Example written assuming folder deployed is techweek/dist_

```
git clone https://github.com/redbrick/techweek.git
@@ -19,17 +20,22 @@ npm install
### Docker

```
docker-compose up install
docker-compose run --rm web yarn
```

## How it works

The events.json contains a JSON object containing all events pages.
All the pages themselves are stored in events folder. Each page is a json file with all the details about that years talks.
The Json is used to fill a mustache template since all the pages are the same format and layout and output to dist. The page called Home in the `events.json` will be set as the main page.


The `main.js` file is responsible for displaying the countdown and loading the video feed. Also, it changes colour of the header and individual days, depending on the amount of times you have visited the page. It also handles the #Day so a specific day can be linked to.
All the pages themselves are stored in events folder. Each page is a json file
with all the details about that years talks.
The JSON is used to fill a mustache template since all the pages are the same
format and layout and output to dist. The page called Home in the `events.json`
will be set as the main page.

The `main.js` file is responsible for displaying the countdown and loading the
video feed. Also, it changes colour of the header and individual days, depending
on the amount of times you have visited the page. It also handles the #Day so a
specific day can be linked to.
Gulp concats this with materilize and minifies it to `dist/js`

---
@@ -38,19 +44,19 @@ Gulp concats this with materilize and minifies it to `dist/js`

### Local Development

* When running the files locally, run it using a web server or you will have problems with Same-origin policy. _no longer true as site is regenerated_

A simple solution is to run `gulp dev` which will compile the less, watch it and start a webserver at techweek.dev:8000
Run `gulp dev` which will compile the less, watch it and start a webserver at
localhost:8000 to view the site.

### Docker

```
docker-compose up install
docker-compose up dev
docker-compose run --rm web yarn
docker-compose up -d
```

### sCSS
### SCSS

All the css is compiled from scss in the css directory.
Run `gulp dev` to have gulp watch the less directory and compile all the less in to `dist/css`.
Run `gulp dev` to have gulp watch the less directory and compile all the less in
to `dist/css`.
Run `gulp` to compile the sass to css in `dist/css`

+ 2
- 12
docker-compose.yml Datei anzeigen

@@ -1,18 +1,8 @@
version: "3"

services:
install:
web:
image: node:boron
container_name: techweek-install
command: npm install --unsafe-perm
working_dir: /usr/src/app
volumes:
- $PWD:/usr/src/app

dev:
image: node:boron
container_name: techweek-server
command: npm run dev
command: yarn dev
working_dir: /usr/src/app
tty: true
ports:


Laden…
Abbrechen
Speichern