forked from goharbor/harbor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update compose template, introduce support for photon
- Loading branch information
1 parent
14640c5
commit 73b5ea0
Showing
9 changed files
with
182 additions
and
3 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
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
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,90 @@ | ||
version: '2' | ||
services: | ||
log: | ||
image: harbor_log_photon | ||
restart: always | ||
volumes: | ||
- /var/log/harbor/:/var/log/docker/ | ||
ports: | ||
- 1514:514 | ||
registry: | ||
image: library/registry:2.5.0 | ||
restart: always | ||
volumes: | ||
- /data/registry:/storage | ||
- ./config/registry/:/etc/registry/ | ||
environment: | ||
- GODEBUG=netdns=cgo | ||
ports: | ||
- 5001:5001 | ||
command: | ||
["serve", "/etc/registry/config.yml"] | ||
depends_on: | ||
- log | ||
logging: | ||
driver: "syslog" | ||
options: | ||
syslog-address: "tcp://127.0.0.1:1514" | ||
tag: "registry" | ||
mysql: | ||
build: ./db/ | ||
restart: always | ||
volumes: | ||
- /data/database:/var/lib/mysql | ||
env_file: | ||
- ./config/db/env | ||
depends_on: | ||
- log | ||
logging: | ||
driver: "syslog" | ||
options: | ||
syslog-address: "tcp://127.0.0.1:1514" | ||
tag: "mysql" | ||
ui: | ||
image: harbor_ui_photon | ||
env_file: | ||
- ./config/ui/env | ||
restart: always | ||
volumes: | ||
- ./config/ui/app.conf:/etc/ui/app.conf | ||
- ./config/ui/private_key.pem:/etc/ui/private_key.pem | ||
depends_on: | ||
- log | ||
logging: | ||
driver: "syslog" | ||
options: | ||
syslog-address: "tcp://127.0.0.1:1514" | ||
tag: "ui" | ||
jobservice: | ||
image: harbor_jobservice_photon | ||
env_file: | ||
- ./config/jobservice/env | ||
restart: always | ||
volumes: | ||
- /data/job_logs:/var/log/jobs | ||
- ./config/jobservice/app.conf:/etc/jobservice/app.conf | ||
depends_on: | ||
- ui | ||
logging: | ||
driver: "syslog" | ||
options: | ||
syslog-address: "tcp://127.0.0.1:1514" | ||
tag: "jobservice" | ||
proxy: | ||
image: library/nginx:1.9.0 | ||
restart: always | ||
volumes: | ||
- ./config/nginx:/etc/nginx | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
depends_on: | ||
- mysql | ||
- registry | ||
- ui | ||
- log | ||
logging: | ||
driver: "syslog" | ||
options: | ||
syslog-address: "tcp://127.0.0.1:1514" | ||
tag: "proxy" |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ MAINTAINER [email protected] | |
RUN apt-get update \ | ||
&& apt-get install -y libldap2-dev \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
COPY . /go/src/github.com/vmware/harbor | ||
|
||
WORKDIR /go/src/github.com/vmware/harbor/jobservice | ||
|
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,8 @@ | ||
FROM library/photon:latest | ||
|
||
RUN mkdir /harbor/ | ||
COPY ./Deploy/jobservice/harbor_jobservice /harbor/ | ||
|
||
RUN chmod u+x /harbor/harbor_jobservice | ||
WORKDIR /harbor/ | ||
ENTRYPOINT ["/harbor/harbor_jobservice"] |
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,26 @@ | ||
FROM library/photon:latest | ||
|
||
# run logrotate hourly, disable imklog model, provides TCP/UDP syslog reception | ||
RUN tdnf install -y cronie rsyslog logrotate shadow\ | ||
&& mv /etc/cron.daily/logrotate /etc/cron.hourly/ \ | ||
&& mkdir /etc/rsyslog.d/ \ | ||
&& mkdir /var/spool/rsyslog \ | ||
&& groupadd syslog \ | ||
&& useradd -g syslog syslog | ||
|
||
ADD rsyslog.conf /etc/rsyslog.conf | ||
|
||
COPY logrotate.conf.photon /etc/logrotate.conf | ||
|
||
# logrotate configuration file for docker | ||
ADD logrotate_docker.conf /etc/logrotate.d/ | ||
|
||
# rsyslog configuration file for docker | ||
ADD rsyslog_docker.conf /etc/rsyslog.d/ | ||
|
||
|
||
VOLUME /var/log/docker/ | ||
|
||
EXPOSE 514 | ||
|
||
CMD crond && rsyslogd -n |
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,35 @@ | ||
# see "man logrotate" for details | ||
# rotate log files weekly | ||
weekly | ||
|
||
# keep 4 weeks worth of backlogs | ||
rotate 4 | ||
|
||
# create new (empty) log files after rotating old ones | ||
create | ||
|
||
# use date as a suffix of the rotated file | ||
dateext | ||
|
||
# uncomment this if you want your log files compressed | ||
#compress | ||
|
||
# RPM packages drop log rotation information into this directory | ||
include /etc/logrotate.d | ||
|
||
# no packages own wtmp and btmp -- we'll rotate them here | ||
#/var/log/wtmp { | ||
# monthly | ||
# create 0664 root utmp | ||
# minsize 1M | ||
# rotate 1 | ||
#} | ||
|
||
/var/log/btmp { | ||
missingok | ||
monthly | ||
create 0600 root utmp | ||
rotate 1 | ||
} | ||
|
||
# system-specific logs may be also be configured here. |
File renamed without changes.
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,17 @@ | ||
FROM library/photon:latest | ||
|
||
RUN mkdir /harbor/ | ||
RUN tdnf install -y sed apr-util-ldap | ||
|
||
COPY ./Deploy/ui/harbor_ui /harbor/ | ||
|
||
COPY ./views /harbor/views | ||
COPY ./static /harbor/static | ||
COPY ./favicon.ico /harbor/favicon.ico | ||
COPY ./Deploy/jsminify.sh /tmp/jsminify.sh | ||
|
||
RUN chmod u+x /harbor/harbor_ui \ | ||
&& tmp/jsminify.sh /harbor/views/sections/script-include.htm /harbor/static/resources/js/harbor.app.min.js /harbor/ \ | ||
&& echo "TLS_REQCERT allow" >> /etc/openldap/ldap.conf | ||
WORKDIR /harbor/ | ||
ENTRYPOINT ["/harbor/harbor_ui"] |