Created
May 23, 2017 04:53
-
-
Save thpham/f98ffdfeddb182a0282ba64be8f8331b to your computer and use it in GitHub Desktop.
Portus Docker Registry v2
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
version: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
restart: always | |
container_name: nginx-proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- /srv/docker/nginx/certs:/etc/nginx/certs:ro | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
networks: | |
- proxy-tier | |
letsencrypt: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
restart: always | |
container_name: letsencrypt | |
volumes_from: | |
- nginx-proxy | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- /srv/docker/nginx/certs:/etc/nginx/certs:rw | |
networks: | |
- proxy-tier | |
db: | |
image: library/mariadb:10.0.23 | |
restart: always | |
container_name: mariadb | |
environment: | |
- MYSQL_ROOT_PASSWORD=portus | |
volumes: | |
- db-volume:/var/lib/mysql | |
portus: | |
image: opensuse/portus:2.2 | |
restart: always | |
container_name: portus | |
command: puma -b tcp://0.0.0.0:3000 -w 3 | |
environment: | |
- VIRTUAL_HOST=hub.ithings.ch | |
- LETSENCRYPT_HOST=hub.ithings.ch | |
- [email protected] | |
- PORTUS_MACHINE_FQDN_VALUE=hub.ithings.ch | |
- PORTUS_DB_HOST=portus_db_1 | |
volumes: | |
- .:/portus | |
links: | |
- db | |
networks: | |
- proxy-tier | |
crono: | |
image: opensuse/portus:2.2 | |
restart: always | |
container_name: crono | |
entrypoint: bin/crono | |
environment: | |
- PORTUS_MACHINE_FQDN=hub.ithings.ch | |
- PORTUS_DB_HOST=portus_db_1 | |
volumes: | |
- .:/portus | |
links: | |
- db | |
registry: | |
image: library/registry:2.3.1 | |
restart: always | |
container_name: registry | |
environment: | |
- REGISTRY_AUTH_TOKEN_REALM=http://${EXTERNAL_IP}:3000/v2/token | |
- REGISTRY_AUTH_TOKEN_SERVICE=${EXTERNAL_IP}:${REGISTRY_PORT} | |
- REGISTRY_AUTH_TOKEN_ISSUER=${EXTERNAL_IP} | |
volumes: | |
- /registry_data | |
- ./compose/registry/portus.crt:/etc/docker/registry/portus.crt:ro | |
- ./compose/registry/config.yml:/etc/docker/registry/config.yml:ro | |
ports: | |
- ${REGISTRY_PORT}:5000 | |
- 5001:5001 # required to access debug service | |
links: | |
- portus | |
networks: | |
proxy-tier: | |
external: | |
name: nginx-proxy | |
volumes: | |
db-volume: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment