Skip to content

Commit ae9aaed

Browse files
committed
initial commit
0 parents  commit ae9aaed

Some content is hidden

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

53 files changed

+10452
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/.gitignore
2+
**/.gitkeep
3+
src/.env
4+
**/node_modules

.env.local

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PROJECT_NAME="debugbar"
2+
PROJECT_ENVIRONMENT="local"
3+
COMPOSE_PROJECT_NAME="${PROJECT_NAME}_${PROJECT_ENVIRONMENT}"
4+
TRAEFIK_HOST="debugbar.pro.test"

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/docker-compose.override.yml
2+
3+
# JetBrains IDE
4+
.idea/
5+
6+
# Unit test reports
7+
TEST*.xml
8+
9+
# Generated by MacOS
10+
.DS_Store
11+
12+
# Generated by Windows
13+
Thumbs.db
14+
15+
.env

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.14.2

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Startup lokale ontwikkeling
2+
3+
## Prerequisites
4+
1. Developers startup opgepakt: https://www.notion.so/Developers-startup-7e9fef0b962e4d29abfeb83f8ce667cd
5+
6+
## Setup
7+
1. Clone deze repository naar je lokale ontwikkelomgeving.
8+
2. Maak Docker environment file aan via ```cp .env.local .env``` en pas eventueel ```.env``` aan.
9+
3. Maak je eigen docker compose file ```cp docker-compose.local.yml docker-compose.override.yml```
10+
4. Build het project: ```docker-compose build```
11+
5. Run en run het project: ```docker-compose up -d```
12+
13+
## Run playground
14+
1. Shell in de workspace container: ```docker-compose exec workspace sh```
15+
2. Installeer Yarn: ```yarn```
16+
3. Run Yarn DevServer: ```yarn dev```
17+
4. Je project is nu te benaderen via https://ui.auto.test
18+
19+
## Run storybook
20+
1. Shell in de workspace container: ```docker-compose exec storybook sh```
21+
2. Installeer Yarn: ```yarn```
22+
3. Run Yarn storybook: ```yarn storybook```
23+
4. Je project is nu te benaderen via https://storybook.auto.test
24+
25+
## Build
26+
1. Shell in de workspace container: ```docker-compose exec workspace sh```
27+
2. build components: ```yarn build```
28+
29+
## Publish
30+
1. Shell in de workspace container: ```docker-compose exec workspace sh```
31+
2. Publish ```npm run publish --public```

docker-compose.local.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: '3.8'
2+
services:
3+
4+
workspace:
5+
image: vue-debugbar-workspace
6+
build:
7+
context: .
8+
dockerfile: ./dockerfiles/workspace.dockerfile
9+
restart: unless-stopped
10+
ports:
11+
- 80
12+
labels:
13+
- "traefik.enable=true"
14+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${TRAEFIK_HOST}`)"
15+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
16+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${TRAEFIK_HOST}`)"
17+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
18+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=secure-headers@file"
19+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls=true"
20+
21+
volumes:
22+
- ./src:/var/www:cached
23+
networks:
24+
- web
25+
command: ['tail', '-f', '/dev/null']
26+
27+
# Ignore nginx container on local
28+
nginx:
29+
profiles:
30+
- do-not-start

docker-compose.stack.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: '3.8'
2+
services:
3+
4+
nginx:
5+
deploy:
6+
replicas: 1
7+
restart_policy:
8+
condition: any
9+
delay: 5s
10+
max_attempts: 5
11+
window: 120s
12+
labels:
13+
- "traefik.enable=true"
14+
- "traefik.http.services.${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=80"
15+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${TRAEFIK_HOST}`)"
16+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
17+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=to-https@file"
18+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.service=${COMPOSE_PROJECT_NAME}"
19+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${TRAEFIK_HOST}`)"
20+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
21+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=secure-headers@file"
22+
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.certresolver=lets-encrypt"

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: '3.8'
2+
services:
3+
4+
nginx:
5+
image: ${PROJECT_NAME}-nginx:${PROJECT_ENVIRONMENT}
6+
build:
7+
context: .
8+
dockerfile: ./dockerfiles/nginx.dockerfile
9+
networks:
10+
- web
11+
12+
networks:
13+
web:
14+
external: true

dockerfiles/nginx.dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM nginx:alpine
2+
3+
COPY dockerfiles/vhost.conf /etc/nginx/conf.d/default.conf
4+
5+
WORKDIR /var/www
6+
7+
# Copy static assets from builder stage
8+
COPY ./src/dist .

dockerfiles/vhost.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
server {
2+
server_name _;
3+
listen 80;
4+
index index.html;
5+
root /var/www;
6+
client_max_body_size 164M;
7+
location / {
8+
try_files $uri $uri/ /index.html;
9+
add_header Cache-Control "no-store, no-cache, must-revalidate";
10+
}
11+
12+
include mime.types;
13+
types {
14+
application/javascript js mjs;
15+
}
16+
17+
location ~ (index.html|service-worker.js)$ {
18+
add_header Last-Modified $date_gmt;
19+
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
20+
if_modified_since off;
21+
expires off;
22+
etag off;
23+
}
24+
25+
location /js {
26+
expires 1y;
27+
add_header Cache-Control "public";
28+
access_log off;
29+
}
30+
}

0 commit comments

Comments
 (0)