Skip to content

Commit

Permalink
Merge pull request #99 from ise621/release-0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
simon-wacker authored Aug 31, 2020
2 parents 6f5c12e + 899332b commit 36d5897
Show file tree
Hide file tree
Showing 80 changed files with 30,056 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
*.pdf
*.md
Makefile
Dockerfile
tags
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/tags
21 changes: 21 additions & 0 deletions .graphql-schema-linterrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"rules": [
//"arguments-have-descriptions",
//"defined-types-are-used",
"deprecations-have-a-reason",
"descriptions-are-capitalized",
"enum-values-all-caps",
//"enum-values-have-descriptions",
//"enum-values-sorted-alphabetically",
"fields-are-camel-cased",
//"fields-have-descriptions",
//"input-object-fields-sorted-alphabetically",
"input-object-values-are-camel-cased",
//"input-object-values-have-descriptions",
"relay-connection-types-spec",
//"relay-connection-arguments-spec",
//"type-fields-sorted-alphabetically",
"types-are-capitalized",
//"types-have-descriptions"
]
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
152 changes: 152 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

### Changed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

### Deprecated
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

### Removed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

### Fixed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

### Security
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

## [0.1.0] - 2020-08-31
First major-version-zero release
[0.1.0](https://semver.org/#how-should-i-deal-with-revisions-in-the-0yz-initial-development-phase).

Note that according to
[Semantic Versioning Specification, Item 4](https://semver.org/#spec-item-4),
> Major version zero (0.y.z) is for initial development. Anything MAY change at
> any time. The public API SHOULD NOT be considered stable.
[Unreleased]: https://github.com/ise621/building-envelope-data/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/ise621/building-envelope-data/releases/tag/v0.1.0
114 changes: 114 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# We use Debian as base image for the reasons given on
# https://pythonspeed.com/articles/base-image-python-docker-images/
# see https://www.debian.org
FROM debian:10.5-slim

##################
# As user `root` #
##################

# When you are on a Linux machine and when you run `docker build`, then set the
# `--build-arg`s `GID` and `UID` to your user id and its primary group id. This
# makes it seamless to use and generate files from within the shell of
# a running docker container based on this image and access those files later
# on the host.
ARG UID=1000
ARG GID=1000

#-------------------------------------------#
# Create non-root user `me` and group `us` #
#-------------------------------------------#
# which are used to run commands in later for security reasons,
# see https://medium.com/@mccode/processes-in-containers-should-not-run-as-root-2feae3f0df3b
RUN \
addgroup --system --gid ${GID} us && \
adduser --system --uid ${UID} --ingroup us me

#-------------------------------#
# Make `bash` the default shell #
#-------------------------------#
# In particular, `ln ... bash /bin/sh` makes Python's `subprocess` module use
# `bash` by default. If we want to make sure that `bash` is always used
# regardless of the default shell, we can pass `executable="/bin/bash"` to
# Python's `subprocess#run` function.
RUN \
ln --symbolic --force \
bash /bin/sh && \
sed --in-place --expression \
"s#bin/dash#bin/bash#" \
/etc/passwd

#---------------------#
# Install `dumb-init` #
#---------------------#
# a minimal init system for Linux containers, see https://github.com/Yelp/dumb-init
RUN \
# Retrieve new lists of packages
apt-get update && \
# Install `dumb-init`
apt-get install --assume-yes --no-install-recommends \
dumb-init && \
# Remove unused packages, erase archive files, and remove lists of packages
apt-get autoremove --assume-yes && \
apt-get clean && \
rm --recursive --force /var/lib/apt/lists/*

#---------------------------#
# Install development tools #
#---------------------------#
# * GNU Make to run often needed commands, see
# https://www.gnu.org/software/make
# * Node package manager to install Node development tools, see
# https://www.npmjs.com
# * Another JSON Schema Validator (AJV) command-line interface to validate
# schemas and files, see https://github.com/ajv-validator/ajv-cli
RUN \
# Retrieve new lists of packages
apt-get update && \
# Install system development tools
apt-get install --assume-yes --no-install-recommends \
make \
npm && \
# Upgrade Node package manager to version 6.14.7
npm install [email protected] --global && \
# Install Node development tools
npm install --global [email protected] && \
npm install --global [email protected] && \
npm install --global [email protected] && \
npm install --global [email protected] && \
# Remove unused packages, erase archive files, and remove lists of packages
apt-get autoremove --assume-yes && \
apt-get clean && \
rm --recursive --force /var/lib/apt/lists/*

#-------------------------#
# Set-up `/app` directory #
#-------------------------#
# Make the `/app` directory link to the `/home/me/app` directory and make both
# be owned by the user `me` and the group `us`.
RUN \
mkdir /home/me/app && \
chown me:us /home/me/app && \
ln --symbolic /home/me/app /app && \
chown me:us --no-dereference /app

################
# As user `me` #
################
# Switch to the user `me`
USER me
ENV USER=me
# Make `/app` the default directory
WORKDIR /app

#-------------------------------------------#
# Set-up for containers based on this image #
#-------------------------------------------#
# Create mount points to mount the project and the installed Python
# dependencies.
VOLUME /app/

# Run commands within the process supervisor and init system `dumb-init`
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Make `bash` the default command
CMD ["bash"]
Loading

0 comments on commit 36d5897

Please sign in to comment.