10 Commits

Author SHA1 Message Date
  Dany Sluijk 7224de1336 chore(release): 1.2.0 [skip ci] 4 months ago
  Dany Sluijk 15abb6685e Merge pull request 'fix(ci): push docker images with Drone instead of Semantic Release' (#29) from feat/docker into master 4 months ago
  Dany Sluijk 8c4e7174a1
fix(ci): yaml format 4 months ago
  Dany Sluijk 587f634d93
fix(ci): push docker images with Drone instead of Semantic Release 4 months ago
  Dany Sluijk a58595e1ff Merge pull request 'fix(ci): escape the docker username' (#28) from fix/dockerUsername into master 4 months ago
  Dany Sluijk 5df59ea409
fix(ci): escape the docker username 4 months ago
  Dany Sluijk 017c53947a Merge pull request 'fix(ci): fix the docker login' (#27) from fix/dockerLogin into master 4 months ago
  Dany Sluijk 5a7d8f4dc3
fix(ci): fix the docker login 4 months ago
  Dany Sluijk 9ec4af8606 Merge pull request 'feat: add Docker file and CD' (#26) from feat/docker into master 4 months ago
  Dany Sluijk 3a3cf1c3b1
feat: add Docker file and CD 4 months ago
6 changed files with 124 additions and 2 deletions
Split View
  1. +10
    -0
      .drone.yml
  2. +1
    -1
      .releaserc
  3. +15
    -0
      CHANGELOG.md
  4. +45
    -0
      Dockerfile
  5. +52
    -0
      nginx.conf
  6. +1
    -1
      package.json

+ 10
- 0
.drone.yml View File

@@ -69,6 +69,16 @@ steps:
from_secret: DEPLOY_IV
GIT_COMMITTER_EMAIL: robot@dany.dev
GIT_COMMITTER_NAME: Drone CI
- name: Docker push
image: docker:dind
commands:
- docker login harbor.dany.dev -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
- docker build . -t harbor.dany.dev/teenyui/teenyui
- docker push harbor.dany.dev/teenyui/teenyui
environment:
DOCKER_USERNAME: robot\$teenyui
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD

trigger:
branch:


+ 1
- 1
.releaserc View File

@@ -19,6 +19,6 @@
"CHANGELOG.md"
]
}
]
],
]
}

+ 15
- 0
CHANGELOG.md View File

@@ -1,3 +1,18 @@
# [1.2.0](https://git.dany.dev/dsluijk/teenyui/compare/v1.1.2...v1.2.0) (2021-01-04)


### Bug Fixes

* **ci:** escape the docker username ([5df59ea](https://git.dany.dev/dsluijk/teenyui/commit/5df59ea4090726c0250badb750b957bac73d6b04))
* **ci:** fix the docker login ([5a7d8f4](https://git.dany.dev/dsluijk/teenyui/commit/5a7d8f4dc313bdb7aba2507099bbbcd6e046725a))
* **ci:** push docker images with Drone instead of Semantic Release ([587f634](https://git.dany.dev/dsluijk/teenyui/commit/587f634d9336770495b1ce7ef0d95d8893328874))
* **ci:** yaml format ([8c4e717](https://git.dany.dev/dsluijk/teenyui/commit/8c4e7174a182f9ed6e27914bcff3f92ce2ba266f))


### Features

* add Docker file and CD ([3a3cf1c](https://git.dany.dev/dsluijk/teenyui/commit/3a3cf1c3b1f5286bf357468924728d4bcf77fb0c))

## [1.1.2](https://git.dany.dev/dsluijk/teenyui/compare/v1.1.1...v1.1.2) (2021-01-03)




+ 45
- 0
Dockerfile View File

@@ -0,0 +1,45 @@
# Use the NodeJS image as builder
FROM node:lts AS builder

# Create the workspace
RUN mkdir -p /usr/src/app/example
WORKDIR /usr/src/app

# Copy over the package, and install the dependencies
COPY package.json /usr/src/app
COPY example/package.json /usr/src/app/example
RUN yarn
WORKDIR /usr/src/app/example
RUN yarn
WORKDIR /usr/src/app

# Copy over the other files.
COPY src /usr/src/app/src
COPY theme /usr/src/app/theme
COPY rollup.config.js /usr/src/app
COPY tsconfig.json /usr/src/app

# Build the application
RUN yarn build

# Switch to the example folder
WORKDIR /usr/src/app/example

# Copy over the other files.
COPY example/.sassrc /usr/src/app/example
COPY example/tsconfig.json /usr/src/app/example
COPY example/src /usr/src/app/example/src

# Build the example
RUN yarn build

# The actual server, this builds the final image
FROM nginx:alpine

# Copy the nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf

# Copy the output of the builder
COPY --from=builder /usr/src/app/example/dist /usr/share/nginx/html
RUN chown nginx:nginx /usr/share/nginx/html/ -R
EXPOSE 80

+ 52
- 0
nginx.conf View File

@@ -0,0 +1,52 @@
events {
worker_connections 4096;
}

http {
# Set the index
index index.html;
include mime.types;
default_type application/octet-stream;

# Make sure client side routing still works
proxy_intercept_errors on;
error_page 404 = /index.html;

# Optimize request data
client_max_body_size 2m;
client_body_buffer_size 128k;

# Set open file cache
open_file_cache max=10000 inactive=5m;
open_file_cache_valid 10m;
open_file_cache_min_uses 1;
open_file_cache_errors on;

# Enable GZip of files GZipped during build.
gzip_static on;

# Enable on-the-fly GZip for files not GZipped on build time.
gzip on;
gzip_buffers 64 8k;
gzip_comp_level 9;
gzip_disable "msie6";
gzip_http_version 1.1;
gzip_types text/plain application/javascript application/json;

# Add a few security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload" always;
add_header Content-Security-Policy "default-src 'self'" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Frame-Options DENY always;

server {
# Create the server
listen 80;
root /usr/share/nginx/html;

# Add cache expiration
expires 3h;
add_header Cache-Control "public";
}
}

+ 1
- 1
package.json View File

@@ -1,6 +1,6 @@
{
"name": "teenyui",
"version": "1.1.2",
"version": "1.2.0",
"description": "Tiny UI library for Preact",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",


Loading…
Cancel
Save