Browse Source

Initial Commit

master
Michalis Tsoukatos 4 years ago
commit
ee41f79eda
  1. 18
      README.md
  2. 74
      docker-compose.yml
  3. 10
      registry/config.yml
  4. 15
      secrets/portus.crt
  5. 15
      secrets/portus.key

18
README.md

@ -0,0 +1,18 @@
# Portus Test Repository
A simple docker-compose repository to test the [**Portus**][portus] click [**`here`**][portus] for the project's documentation
## Instructions
* `docker-compose up`
* open your browser on http://127.0.0.1:3000
* Create the admin user
* Add 127.0.0.1:5000 as registry
* `name`: the name of your registry
* `use ssl`: do not tick it
* `external registry name`: 127.0.0.1:5000
* `docker-login 127.0.0.1:5000
* tag an image with the prefix 127.0.0.1:5000/<your image name>
* `docker push <your image>`
[portus]: http://port.us.org/

74
docker-compose.yml

@ -0,0 +1,74 @@
version: "3.7"
services:
portus-frontend:
image: opensuse/portus:head
environment:
CCONFIG_PREFIX: PORTUS
PORTUS_SECRET_KEY_BASE: b494a25faa8d22e430e843e220e424e10ac84d2ce0e64231f5b636d21251eb6d267adb042ad5884cbff0f3891bcf911bdf8abb3ce719849ccda9a4889249e5c2
PORTUS_KEY_PATH: /certificates/portus.key
PORTUS_CHECK_SSL_USAGE_ENABLED: "false"
PORTUS_PASSWORD: testpass
PORTUS_DB_ADAPTER: postgresql
PORTUS_DB_HOST: postgres
PORTUS_DB_PORT: 5432
PORTUS_DB_DATABASE: postgres
PORTUS_DB_USERNAME: postgres
PORTUS_DB_PASSWORD: postgres
PORTUS_MACHINE_FQDN_VALUE: 127.0.0.1
RAILS_SERVE_STATIC_FILES: "true"
RAILS_SERVE_STATIC_ASSETS: "true"
ports:
- 3000:3000
volumes:
- ./secrets:/certificates:ro
portus-backend:
image: opensuse/portus:head
environment:
CCONFIG_PREFIX: PORTUS
PORTUS_SECRET_KEY_BASE: b494a25faa8d22e430e843e220e424e10ac84d2ce0e64231f5b636d21251eb6d267adb042ad5884cbff0f3891bcf911bdf8abb3ce719849ccda9a4889249e5c2
PORTUS_KEY_PATH: /certificates/portus.key
PORTUS_CHECK_SSL_USAGE_ENABLED: "false"
PORTUS_PASSWORD: testpass
PORTUS_DB_ADAPTER: postgresql
PORTUS_DB_HOST: postgres
PORTUS_DB_PORT: 5432
PORTUS_DB_DATABASE: postgres
PORTUS_DB_USERNAME: postgres
PORTUS_DB_PASSWORD: postgres
PORTUS_MACHINE_FQDN_VALUE: 127.0.0.1
PORTUS_BACKGROUND: "true"
volumes:
- ./secrets:/certificates:ro
postgres:
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
registry:
image: registry
environment:
REGISTRY_AUTH_TOKEN_REALM: http://127.0.0.1:3000/v2/token
REGISTRY_AUTH_TOKEN_SERVICE: 127.0.0.1:5000
REGISTRY_AUTH_TOKEN_ISSUER: 127.0.0.1
EXTERNAL_IP: 127.0.0.1
REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: /secrets/portus.crt
REGISTRY_NOTIFICATIONS_ENDPOINTS: >
- name: portus
url: http://portus-frontend:3000/v2/webhooks/events
timeout: 2000ms
threshold: 5
backoff: 1s
volumes:
- ./secrets:/secrets:ro
- ./registry/config.yml:/etc/docker/registry/config.yml:ro
- registry:/var/lib/registry:rw
ports:
- 5000:5000
volumes:
registry:

10
registry/config.yml

@ -0,0 +1,10 @@
version: 0.1
storage:
filesystem:
rootdirectory: /var/lib/registry
delete:
enabled: true
http:
addr: 0.0.0.0:5000
debug:
addr: 0.0.0.0:5001

15
secrets/portus.crt

@ -0,0 +1,15 @@
-----BEGIN CERTIFICATE-----
MIICZjCCAc+gAwIBAgIUM4zpRKj7ZVRPS7NlGrMtu1GtkIwwDQYJKoZIhvcNAQEF
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMDExMzAxOTQ0MDlaFw0yMTEx
MzAxOTQ0MDlaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQID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cvUsiVCYAA5mgsw0aEmuNVoSqmQFo
1vRWyYJZAkEAwkUtIzQ1sNpKhS1hy1iPnZHbaAcqQ4w0SzPS9twaCTOIE0OneBEd
xoZvjphy91u+DioVN/aTSuYagoKu61NndQJARazJoV3L0pzFSAiQFb2/XQyg6iM/
LCDnGTsLhmVtkoBthGW/MlivuA0yS2D+v4xDTip48fiirsT9t0L/5LJriQJBAIzj
sGWMkresyEinbfoUQytqQW3DbIJKZw53CjOf0n4D0lbuRMEN4MM+ch8/Lnl4HnCV
UoggmhfCo00tS4A9H5UCQDtzeCAtyR+SFoYHcn+JwY7T2pyWG5n6KuSQdoHTx/9f
OjIdSsx+RkUPW8cKFAPmw1XHmDu4JBt0a6t81qyIawU=
-----END RSA PRIVATE KEY-----
Loading…
Cancel
Save