diff --git a/Jenkinsfile b/Jenkinsfile index 2e09cfd..0c168dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ stage('Deploy') { steps { echo 'Starting..' - sh 'docker-compose -f docker-compose.yml up -d' + sh 'docker-compose -f docker-compose-auto.yml up -d' } } } diff --git a/Jenkinsfile b/Jenkinsfile index 2e09cfd..0c168dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ stage('Deploy') { steps { echo 'Starting..' - sh 'docker-compose -f docker-compose.yml up -d' + sh 'docker-compose -f docker-compose-auto.yml up -d' } } } diff --git a/docker-compose-manual.yml b/docker-compose-manual.yml deleted file mode 100644 index 1a4df98..0000000 --- a/docker-compose-manual.yml +++ /dev/null @@ -1,64 +0,0 @@ - -# -# Catch-22 if put this in docker as we put the docker-compose.yml in git, -# same if we rebuild it from jenkins and put jenkins in docker, -# same if we put nginx in docker too. -# It might be that we need to not put those in docker even though they could. -# Or would this be solved if we just don't run docker-compose.yml by -# jenkins on git changes. Instead we have a docker-compose.yml just for -# those services (jenkins, gitbucket and possibly nginx) which is manually run? -# - - -# Warning, none of this is tested yet or working - - -services-disabled: - - gitbucket: - image: gitbucket/gitbucket:latest - container_name: gitbucket - # hostname: gitbucket.localdomain - volumes: - # Docker access - # - /media/Data/GitBucketContainer:/gitbucket - - /media/Data/Containers/GitBucket:/gitbucket - restart: always - ports: - - "9093:8080" - - jenkins: - image: jenkins/jenkins:lts - container_name: jenkins - # hostname: gitbucket.localdomain - restart: always - privileged: true - user: root - volumes: - - /media/Data/Containers/Jenkins:/var/jenkins_home - - /var/run/docker.sock:/var/run/docker.sock - ports: - - "8080:8080" - - "50000:50000" - - # jenkins-agent: - # image: jenkins/ssh-agent:jdk11 - # privileged: true - # user: root - # container_name: agent - # expose: - # - 22 - # environment: - # - JENKINS_AGENT_SSH_PUBKEY=ssh-rsa AAAAB3N - - nginx: - image: nginx:1.16.0-alpine - container_name: nginx - # hostname: nginx.localdomain - restart: always - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf:ro - ports: - - "8080:80" - - diff --git a/Jenkinsfile b/Jenkinsfile index 2e09cfd..0c168dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ stage('Deploy') { steps { echo 'Starting..' - sh 'docker-compose -f docker-compose.yml up -d' + sh 'docker-compose -f docker-compose-auto.yml up -d' } } } diff --git a/docker-compose-manual.yml b/docker-compose-manual.yml deleted file mode 100644 index 1a4df98..0000000 --- a/docker-compose-manual.yml +++ /dev/null @@ -1,64 +0,0 @@ - -# -# Catch-22 if put this in docker as we put the docker-compose.yml in git, -# same if we rebuild it from jenkins and put jenkins in docker, -# same if we put nginx in docker too. -# It might be that we need to not put those in docker even though they could. -# Or would this be solved if we just don't run docker-compose.yml by -# jenkins on git changes. Instead we have a docker-compose.yml just for -# those services (jenkins, gitbucket and possibly nginx) which is manually run? -# - - -# Warning, none of this is tested yet or working - - -services-disabled: - - gitbucket: - image: gitbucket/gitbucket:latest - container_name: gitbucket - # hostname: gitbucket.localdomain - volumes: - # Docker access - # - /media/Data/GitBucketContainer:/gitbucket - - /media/Data/Containers/GitBucket:/gitbucket - restart: always - ports: - - "9093:8080" - - jenkins: - image: jenkins/jenkins:lts - container_name: jenkins - # hostname: gitbucket.localdomain - restart: always - privileged: true - user: root - volumes: - - /media/Data/Containers/Jenkins:/var/jenkins_home - - /var/run/docker.sock:/var/run/docker.sock - ports: - - "8080:8080" - - "50000:50000" - - # jenkins-agent: - # image: jenkins/ssh-agent:jdk11 - # privileged: true - # user: root - # container_name: agent - # expose: - # - 22 - # environment: - # - JENKINS_AGENT_SSH_PUBKEY=ssh-rsa AAAAB3N - - nginx: - image: nginx:1.16.0-alpine - container_name: nginx - # hostname: nginx.localdomain - restart: always - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf:ro - ports: - - "8080:80" - - diff --git a/docker-compose.yml b/docker-compose.yml index 7da64e3..1a4df98 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,76 +1,64 @@ -services: +# +# Catch-22 if put this in docker as we put the docker-compose.yml in git, +# same if we rebuild it from jenkins and put jenkins in docker, +# same if we put nginx in docker too. +# It might be that we need to not put those in docker even though they could. +# Or would this be solved if we just don't run docker-compose.yml by +# jenkins on git changes. Instead we have a docker-compose.yml just for +# those services (jenkins, gitbucket and possibly nginx) which is manually run? +# - cockpit-ws: - image: cockpit-ws:latest - container_name: cockpit-ws - hostname: cockpit.localdomain + +# Warning, none of this is tested yet or working + + +services-disabled: + + gitbucket: + image: gitbucket/gitbucket:latest + container_name: gitbucket + # hostname: gitbucket.localdomain + volumes: + # Docker access + # - /media/Data/GitBucketContainer:/gitbucket + - /media/Data/Containers/GitBucket:/gitbucket + restart: always + ports: + - "9093:8080" + + jenkins: + image: jenkins/jenkins:lts + container_name: jenkins + # hostname: gitbucket.localdomain restart: always privileged: true + user: root volumes: - # Authentication - - /etc/passwd:/etc/passwd:ro - - /etc/group:/etc/group:ro - - /etc/shadow:/etc/shadow:ro - # Docker access - - /var/run/docker.sock:/var/run/docker.sock - # Dummy home directories - - /media/Data/Containers/Cockpit/home:/home - ports: - - "9092:9092" - - portainer: - image: portainer/portainer-ce:latest - container_name: portainer-ce - hostname: portainer.localdomain - restart: always - volumes: - # Docker access + - /media/Data/Containers/Jenkins:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock ports: - - "9000:9000" + - "8080:8080" + - "50000:50000" - open-project: - image: openproject/community:latest - container_name: open-project + # jenkins-agent: + # image: jenkins/ssh-agent:jdk11 + # privileged: true + # user: root + # container_name: agent + # expose: + # - 22 + # environment: + # - JENKINS_AGENT_SSH_PUBKEY=ssh-rsa AAAAB3N + + nginx: + image: nginx:1.16.0-alpine + container_name: nginx + # hostname: nginx.localdomain restart: always volumes: - - /media/Data/Containers/OpenProject/static:/var/openproject/assets - - /media/Data/Containers/OpenProject/pgdata:/var/openproject/pgdata + - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: - - "8082:80" + - "8080:80" - code-server: - image: lscr.io/linuxserver/code-server:latest - container_name: code-server - restart: always - environment: - - PUID=1000 - - PGID=1000 - - TZ=Etc/UTC - - PASSWORD=password #optional - - HASHED_PASSWORD= #optional - - SUDO_PASSWORD=password #optional - - SUDO_PASSWORD_HASH= #optional - - PROXY_DOMAIN=code-server.localdomain #optional - - DEFAULT_WORKSPACE=/config/workspace #optional - volumes: - - /media/Data/Containers/CodeServer/config:/config - ports: - - "8443:8443" - - minecraft: - image: itzg/minecraft-server - container_name: minecraft - restart: always - deploy: - resources: - limits: - memory: 1.5G - environment: - EULA: "TRUE" - volumes: - - "~/minecraft_data:/data" - ports: - - "25565:25565"