Skip to content

Commit 4d1a622

Browse files
author
Misty Stanley-Jones
committed
1 parent 17f54b8 commit 4d1a622

File tree

751 files changed

+50237
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

751 files changed

+50237
-110
lines changed

.bumpversion.cfg

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[bumpversion]
2+
current_version = 1.1.0
3+
commit = True
4+
tag = True
5+

.eslintrc

-110
This file was deleted.

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
node_modules
2+
dist
3+
dist-app-server
4+
.tmp
5+
.sass-cache
6+
app/bower_components
7+
test/bower_components
8+
.idea
9+
.nodemon-find-ref
10+
.DS_Store
11+
12+
\#*#
13+
.#*
14+
15+
auto-docs
16+
17+
netrc
18+
private-deps/*
19+
app/scripts/build
20+
restclient.rc
21+
.build
22+
.build-prod

Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM bagel/universe:337f873f4f23f4b2603972229ae3519c5f61f6d7
2+
3+
# Source
4+
COPY ./app /opt/hub/app
5+
# Webpack
6+
COPY ./webpack.config.js /opt/hub/webpack.config.js
7+
COPY ./_webpack /opt/hub/_webpack
8+
# Make
9+
COPY ./Makefile /opt/hub/Makefile
10+
# Gulp
11+
COPY ./gulpfile.js /opt/hub/gulpfile.js
12+
COPY ./gulp-tasks /opt/hub/gulp-tasks
13+
# ESLint
14+
COPY ./.eslintrc /opt/hub/.eslintrc
15+
# Flow
16+
ENV LOGNAME bagels
17+
COPY ./flow-libs /opt/hub/flow-libs
18+
COPY .flowconfig /opt/hub/.flowconfig
19+
ENV PATH /opt/flow/:$PATH
20+
21+
RUN DEBUG=* webpack -d
22+
RUN make server-target
23+
RUN make styles-base
24+
RUN gulp images::dev
25+
RUN make images
26+
RUN make docker-font-dev
27+
# favicon
28+
COPY ./app/favicon.ico /opt/hub/app/.build/

Jenkinsfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Only run on Linux atm
2+
wrappedNode(label: 'docker') {
3+
deleteDir()
4+
stage "checkout"
5+
checkout scm
6+
7+
documentationChecker("docs")
8+
}

Makefile

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
.PHONY: dns server-prod-target server-target server-extras base base-tag prod prod-tag push-builders js-prod images images-prod
2+
3+
# Set up make's
4+
dns:
5+
./containers/dnsmasq/configure_system_dns.sh
6+
hub-deps:
7+
git clone git@github.com:docker/docker-ux.git ./private-deps/docker-ux
8+
git clone git@github.com:docker/hub-js-sdk.git ./private-deps/hub-js-sdk
9+
# -> bootstrap-dev
10+
server-target:
11+
mkdir -p app/.build/public/styles
12+
cp -R app/img app/.build/public
13+
styles-base:
14+
cp ./private-deps/docker-ux/dist/styles/main.css ./app/.build/public/styles/main.css
15+
images:
16+
cp -R ./private-deps/docker-ux/dist/images ./app/.build/public/
17+
docker-font-dev:
18+
cp -R ./private-deps/docker-ux/dist/fonts ./app/.build/public/
19+
cp ./app/fonts/* ./app/.build/public/fonts/
20+
mkdir -p app/.build/public/styles
21+
cp ./app/styles/font-awesome.min.css ./app/.build/public/styles/font-awesome.min.css
22+
23+
# Circle make's
24+
local:
25+
docker build -f local.Dockerfile -t bagel/hub-builders-local .
26+
copy-local:
27+
docker run --name bagel-local -d bagel/hub-builders-local sleep 50s
28+
docker cp bagel-local:/opt/hub/.build-prod ./.local/
29+
stage:
30+
docker build -f dockerfiles/Dockerfile-stage-build -t bagel/hub-builders-stage .
31+
copy-stage:
32+
docker run --name bagel-stage -d bagel/hub-builders-stage sleep 50s
33+
docker cp bagel-stage:/opt/hub/.build-prod ./.stage/
34+
prod:
35+
docker build -f dockerfiles/Dockerfile-prod-build -t bagel/hub-builders-prod .
36+
base-prod-tag:
37+
$(shell docker tag bagel/hub-builders-prod:latest bagel/hub-builders-prod:$(shell git rev-parse --verify HEAD))
38+
copy-prod:
39+
docker run --name bagel-prod -d bagel/hub-builders-prod sleep 50s
40+
docker cp bagel-prod:/opt/hub/.build-prod .
41+
42+
# Dockerfile make's
43+
server-prod-target:
44+
rm -rf .build-prod
45+
mkdir -p .build-prod
46+
server-extras:
47+
cp app-server/package.json .build-prod/package.json
48+
cp app-server/favicons/favicon-dev.ico .build-prod/favicon.ico
49+
cp app-server/Dockerfile .build-prod/Dockerfile
50+
js-prod:
51+
ENV=production webpack --production --config _webpack/webpack.prod.config.js
52+
ENV=production webpack --production --config _webpack/webpack.server.config.js
53+
js-stage:
54+
ENV=staging webpack --production --config _webpack/webpack.prod.config.js
55+
ENV=staging webpack --production --config _webpack/webpack.server.config.js
56+
js-local:
57+
ENV=local webpack --production --config _webpack/webpack.prod.config.js
58+
ENV=local webpack --production --config _webpack/webpack.server.config.js
59+
images-prod:
60+
cp -R ./private-deps/docker-ux/dist/images .build-prod/public/
61+
docker-font-prod:
62+
cp -R ./private-deps/docker-ux/dist/fonts .build-prod/public
63+
cp -R ./app/fonts/* .build-prod/public/fonts/
64+
mkdir -p app/.build-prod/public/styles
65+
cp ./app/styles/font-awesome.min.css .build-prod/public/styles/font-awesome.min.css
66+
styles-base-prod:
67+
cp ./private-deps/docker-ux/dist/styles/main.css .build-prod/public/styles/main.css
68+
stats-dir:
69+
mkdir -p /stats/css
70+
css-stats:
71+
/opt/hub/node_modules/.bin/cssstats file /opt/hub/.build-prod/public/styles/$(shell cat /tmp/.client-js-hash) > /stats/css-stats.json
72+
73+
# Unused make commands
74+
# Universe commands are no longer used as we now have the universe branch
75+
dev-test-jest:
76+
docker build -f dockerfiles/Dockerfile-builders-dev-jest -t bagel/hub-builders-dev-jest .
77+
prod-tag:
78+
$(shell docker tag bagel/hub-prod:latest bagel/hub-prod:$(shell git rev-parse --verify HEAD))
79+
universe:
80+
# [ ! "${$(npm -v):0:1}" == "2" ] && echo "please \"npm install -g npm\" to get npm3'" && exit 1
81+
rm -rf node_modules
82+
npm install --production
83+
docker build -f dockerfiles/milky-way -t bagel/milky-way .
84+
docker build -f dockerfiles/universe -t bagel/universe .
85+
push-universe:
86+
$(shell docker tag bagel/milky-way:latest bagel/milky-way:$(shell git rev-parse --verify HEAD))
87+
$(shell docker tag bagel/universe:latest bagel/universe:$(shell git rev-parse --verify HEAD))
88+
docker push bagel/milky-way
89+
docker push bagel/universe
90+
new-universe:
91+
sed -i '.bak' "s/universe:[a-z0-9]*$$/universe:${UNIVERSE_TAG}/" Dockerfile
92+
sed -i '.bak' "s/universe:[a-z0-9]*$$/universe:${UNIVERSE_TAG}/" local.Dockerfile
93+
sed -i '.bak' "s/universe:[a-z0-9]*$$/universe:${UNIVERSE_TAG}/" dockerfiles/*
94+
sed -i '.bak' "s/milky-way:[a-z0-9]*$$/milky-way:${UNIVERSE_TAG}/" dockerfiles/*

README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Quickstart
2+
3+
*Make sure to clone this repo into your `/Users/<username>` directory for it to run correctly*
4+
5+
```bash
6+
make dns
7+
make hub-deps
8+
# you must log in as the 'dux' user. ask one of the frontend
9+
# team members for credentials
10+
npm login
11+
npm install
12+
docker-compose build
13+
npm run build:dev
14+
./startup-scripts/bootstrap-dev.sh
15+
docker-compose up -d
16+
```
17+
18+
At this point you will need `tmux` to run `boot-dev-tmux.sh`, it can
19+
be installed on OSX by `brew install tmux`
20+
21+
```bash
22+
./startup-scripts/boot-dev-tmux.sh
23+
```
24+
25+
## tmux env
26+
27+
Here are some basic commands to help you get around tmux. `C` is
28+
Control, `-` means hit both keys, everything else it a literal
29+
character you need to produce.
30+
31+
| Command | Keys |
32+
|--------------|---------|
33+
| Next Window | C-b n |
34+
| Next Panel | C-b o |
35+
| Close Window | C-b & y |
36+
37+
# Docs
38+
39+
* [React](docs/concepts/React.md)
40+
* [Flux](docs/concepts/Flux.md)
41+
* [React Native](docs/concepts/React-Native.md)
42+
* [React Router](docs/concepts/React-Router.md)
43+
* [Immutability](docs/concepts/Immutability.md)

0 commit comments

Comments
 (0)