This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature-gitlabci' into 'master'
Feature: GitLab CI See merge request mvitale1989/docker-taiga!1
- Loading branch information
Showing
5 changed files
with
76 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
media/ | ||
pgdata/ | ||
**.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
stages: | ||
- build | ||
|
||
variables: | ||
GIT_SUBMODULE_STRATEGY: normal | ||
|
||
build-dev: | ||
stage: build | ||
image: | ||
name: gcr.io/kaniko-project/executor:debug | ||
entrypoint: ["/busybox/sh", "-c"] | ||
script: | ||
- mkdir -p ~/.docker | ||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > ~/.docker/config.json | ||
- /kaniko/executor --context $CI_PROJECT_DIR --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG | ||
except: | ||
- tags | ||
|
||
build-prod: | ||
stage: build | ||
image: | ||
name: gcr.io/kaniko-project/executor:debug | ||
entrypoint: ["/busybox/sh"] | ||
script: | ||
- mkdir -p ~/.docker | ||
- echo "{\"auths\":{\"$REGISTRY\":{ \"auth\":\"$REGISTRY_CREDENTIALS\"}}}" > ~/.docker/config.json | ||
- /kaniko/executor --context $CI_PROJECT_DIR --destination $CI_PROJECT_NAME:$CI_COMMIT_REF_NAME | ||
only: | ||
- tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,66 @@ | ||
FROM python:3.5-jessie | ||
MAINTAINER Benjamin Hutchins <ben@hutchins.co> | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Version of Nginx to install | ||
ENV NGINX_VERSION 1.9.7-1~jessie | ||
|
||
RUN apt-key adv \ | ||
--keyserver hkp://pgp.mit.edu:80 \ | ||
--recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 | ||
|
||
RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list | ||
|
||
RUN set -x; \ | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
locales \ | ||
gettext \ | ||
ca-certificates \ | ||
nginx=${NGINX_VERSION} \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
### Setup system | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN \ | ||
echo "### Setup system packages" \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
locales \ | ||
gettext \ | ||
ca-certificates \ | ||
nginx \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
\ | ||
&& echo "### Setup system locale" \ | ||
&& echo "LANGUAGE=en" > /etc/default/locale \ | ||
&& echo "LANG=en_US.UTF-8" >> /etc/default/locale \ | ||
&& echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale \ | ||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ | ||
&& locale-gen \ | ||
\ | ||
&& echo "### Setup nginx access/error log to stdout/stderr" \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales | ||
|
||
### Copy required taiga files | ||
COPY taiga-back /usr/src/taiga-back | ||
COPY taiga-front-dist/ /usr/src/taiga-front-dist | ||
COPY docker-settings.py /usr/src/taiga-back/settings/docker.py | ||
COPY conf/locale.gen /etc/locale.gen | ||
COPY conf/nginx/nginx.conf /etc/nginx/nginx.conf | ||
COPY conf/nginx/taiga.conf /etc/nginx/conf.d/default.conf | ||
COPY conf/nginx/ssl.conf /etc/nginx/ssl.conf | ||
COPY conf/nginx/taiga-events.conf /etc/nginx/taiga-events.conf | ||
|
||
# Setup symbolic links for configuration files | ||
RUN mkdir -p /taiga | ||
COPY conf/taiga/local.py /taiga/local.py | ||
COPY conf/taiga/conf.json /taiga/conf.json | ||
RUN ln -s /taiga/local.py /usr/src/taiga-back/settings/local.py | ||
RUN ln -s /taiga/conf.json /usr/src/taiga-front-dist/dist/conf.json | ||
COPY conf/nginx /etc/nginx | ||
COPY conf/taiga /taiga | ||
COPY checkdb.py /checkdb.py | ||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
# Backwards compatibility | ||
RUN mkdir -p /usr/src/taiga-front-dist/dist/js/ | ||
RUN ln -s /taiga/conf.json /usr/src/taiga-front-dist/dist/js/conf.json | ||
|
||
### Setup taiga | ||
WORKDIR /usr/src/taiga-back | ||
|
||
# specify LANG to ensure python installs locals properly | ||
# fixes benhutchins/docker-taiga-example#4 | ||
# ref benhutchins/docker-taiga#15 | ||
ENV LANG C | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
RUN echo "LANG=en_US.UTF-8" > /etc/default/locale | ||
RUN echo "LC_TYPE=en_US.UTF-8" > /etc/default/locale | ||
RUN echo "LC_MESSAGES=POSIX" >> /etc/default/locale | ||
RUN echo "LANGUAGE=en" >> /etc/default/locale | ||
|
||
ENV LANG en_US.UTF-8 | ||
ENV LC_TYPE en_US.UTF-8 | ||
|
||
RUN \ | ||
echo "### Symlink taiga configuration to config dir" \ | ||
&& ln -s /taiga/local.py /usr/src/taiga-back/settings/local.py \ | ||
&& ln -s /taiga/conf.json /usr/src/taiga-front-dist/dist/conf.json \ | ||
\ | ||
&& echo "### Symlink taiga configuration to legacy config dir" \ | ||
&& mkdir -p /usr/src/taiga-front-dist/dist/js/ \ | ||
&& ln -s /taiga/conf.json /usr/src/taiga-front-dist/dist/js/conf.json \ | ||
\ | ||
&& echo "### Install required python dependencies" \ | ||
&& pip install --no-cache-dir -r requirements.txt | ||
|
||
|
||
### Taiga configuration variables | ||
ENV TAIGA_SSL False | ||
ENV TAIGA_ENABLE_EMAIL False | ||
ENV TAIGA_HOSTNAME localhost | ||
ENV TAIGA_SECRET_KEY "!!!REPLACE-ME-j1598u1J^U*(y251u98u51u5981urf98u2o5uvoiiuzhlit3)!!!" | ||
|
||
RUN locale -a | ||
|
||
# forward request and error logs to docker log collector | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log | ||
RUN ln -sf /dev/stderr /var/log/nginx/error.log | ||
|
||
### Container configuration | ||
EXPOSE 80 443 | ||
|
||
VOLUME /usr/src/taiga-back/media | ||
|
||
COPY checkdb.py /checkdb.py | ||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] |
Oops, something went wrong.