Sign inSign up

nsysware/archiva

By nsysware

•Updated over 1 year ago

Apache Archiva for Nware

Image
0

1.9K

nsysware/archiva repository overview

⁠Apache Archiva for Nware

⁠Description

The Nware Docker Library provides a set of images for development, deployment, and testing of the Nware Platform⁠. See the GitLab page⁠ for the full list of available Docker images for the Nware Platform and for information regarding contributions and issues.

The environment variable ARCHIVA_BASE is set to folder /var/archiva. Config and data directories are created if missing, or an existing ARCHIVA_BASE can be mounted as named volume.

The environment variable ARCHIVA_CONTEXT_PATH is set to context /. The server listens on port 8080. You can change initial Java Heap Size by environment variable ARCHIVA_JVM_MIN, which is set to 128 (in MB) by default. The maximum Java Heap Size can be changed by environment variable ARCHIVA_JVM_MAX (set by default to 128).

⁠Docker image nsysware/archiva

⁠Build the Image
$ docker build -t nsysware/archiva .
⁠Run the Image
$ docker run -it --rm -v $PWD/archiva-data:/var/archiva -p 8080:8080 nsysware/archiva
⁠Run the Image in background
$ docker run -d -i -v $PWD/archiva-data:/var/archiva -p 8080:8080 --name archiva nsysware/archiva
⁠Docker Swarm Stack

stack-archiva.yml

version: '3.7'

services:
  nsys-maven:
    image: nsysware/archiva:latest
    environment:
      - ARCHIVA_JVM_MIN=128
      - ARCHIVA_JVM_MAX=128
    volumes:
      - data:/var/archiva
    networks:
      - net
      - proxy
    logging:
      driver: json-file
    deploy:
      labels:
        - traefik.enable=true
        - traefik.port=8080
        - traefik.docker.network=proxy
        - traefik.r1.frontend.entryPoints=http,https
        - traefik.r1.frontend.rule=Host:maven.nsys.org
        - traefik.r1.frontend.headers.SSLRedirect=true
        - traefik.r1.frontend.priority=5
        - traefik.r2.frontend.entryPoints=http,https
        - traefik.r2.frontend.rule=Host:maven.nsys.org;PathPrefix:/repository
        - traefik.r2.frontend.priority=10
      replicas: 1
      restart_policy:
        condition: any
        #delay: 5s
        #max_attempts: 3
      update_config:
        parallelism: 1
        delay: 30s

networks:
  net:
    driver: overlay
  proxy:
    external: true

volumes:
  data:
    #driver: rexray/dobs
    #driver_opts:
    #  size: 1
    driver: local
    driver_opts:
      type: none
      o: bind
      device: ${ARCHIVA_DATA}

⁠Archiva Configuration

When you need to configure email or to change some server settings, you can do it in folder /var/archiva/conf. We strongly recommend to mount folder /var/archiva as named volume.

Below you can find an example of how to configure the email for Archiva using Gmail's free SMTP service⁠.

/var/archiva/conf/jetty.xml

  <New id="validation_mail" class="org.eclipse.jetty.plus.jndi.Resource">
    <Arg>mail/Session</Arg>
    <Arg>
      <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
        <Set name="user">your_username</Set>
        <Set name="password">your_password</Set>
        <Set name="properties">
          <New class="java.util.Properties">
            <Put name="mail.user">your_username</Put>
            <Put name="mail.password">your_password</Put>
            <Put name="mail.smtp.host">smtp.gmail.com</Put>
            <Put name="mail.transport.protocol">smtp</Put>
            <Put name="mail.smtp.port">587</Put>
            <Put name="mail.smtp.auth">true</Put>
            <Put name="mail.smtp.starttls.enable">true</Put>
            <Put name="mail.debug">true</Put>
          </New>
        </Set>
      </New>
    </Arg>
  </New>
⁠Resources

Tag summary

Content type

Image

Digest

sha256:54fa59677…

Size

354.7 MB

Last updated

over 1 year ago

docker pull nsysware/archiva