Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official docker image #148

Closed
tokuhirom opened this issue Jun 29, 2016 · 12 comments
Closed

Official docker image #148

tokuhirom opened this issue Jun 29, 2016 · 12 comments

Comments

@tokuhirom
Copy link
Contributor

If there's an official docker image, user can try ansible-semaphore more easily.

@matejkramny
Copy link
Contributor

Thats version 1 though.

@dsmorse
Copy link

dsmorse commented Jul 25, 2016

Building the docker image and the docker compose file to bring up both containers is pretty easy. I have a prototype working (I will share it soon) but the problem I've discovered is that the -setup command wants a connection to the db so that it can write the default user directly to the DB... if there was a way to create a file with the username, email, name and password that would then be loaded into the DB when the container starts up making single docker compose file would be trivial.

Currently I created the semaphore container. Start the mysql with a volume mount to store the db data then start the semaphore container and override the run command to execute the setup, then I can use the standard docker compose to get the system up

@dsmorse
Copy link

dsmorse commented Jul 25, 2016

here is a link to my docker wrapper:
https://github.com/dsmorse/semaphore-docker

@imoutahere
Copy link

imoutahere commented Jul 25, 2016

@dsmorse: Have you considered using a flat file and redirecting it into 'semaphore -setup'? If you save the following code into /projects/semaphore-setup.stdin:

127.0.0.1:3306
mysql_user
mysql_password
semaphore
/home/deploy/projects
yes
admin
admn@domain.tld
Admin User
admin_password

Then run it like this: semaphore -setup < /projects/semaphore-setup.stdin

@dsmorse
Copy link

dsmorse commented Jul 26, 2016

Excellent idea... I have a working docker image now at: https://hub.docker.com/r/dsmorse/semaphore-docker/ and the docker compose file in in the original github link

@dsmorse
Copy link

dsmorse commented Jul 27, 2016

OK I guess my docker wrapper is not yet ready for prime time... While it fires up OK it can't clone from a repo... I'll be working on it.

@goozbach
Copy link

goozbach commented Aug 23, 2016

I've done my take on it.

https://github.com/goozbach/semaphore/tree/dockerfiles/Deploy

I've got an issue with the SSL termination using the Nginx proxy (it works but doesn't update the actual run).

@goozbach
Copy link

Figured out the websockets proxy issue, my pull request is #178

@surak
Copy link

surak commented Mar 17, 2021

There's an official docker image as of 2021, but I have no idea how to make it run.

@fiftin
Copy link
Collaborator

fiftin commented Mar 17, 2021

Docker compose example:

version: '2'

services:
  mysql:
    image: mariadb:10
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
      MYSQL_DATABASE: semaphore
      MYSQL_USER: semaphore
      MYSQL_PASSWORD: semaphore

  semaphore:
    image: ansiblesemaphore/semaphore
    environment:
      SEMAPHORE_DB_USER: semaphore
      SEMAPHORE_DB_PASS: semaphore
      SEMAPHORE_DB_HOST: mysql
      SEMAPHORE_DB_PORT: 3306
      SEMAPHORE_DB: semaphore
      SEMAPHORE_PLAYBOOK_PATH: /etc/semaphore
      SEMAPHORE_ADMIN_PASSWORD: password
      SEMAPHORE_ADMIN_NAME: "Developer"
      SEMAPHORE_ADMIN_EMAIL: admin@localhost
      SEMAPHORE_ADMIN: admin
      SEMAPHORE_WEB_ROOT: http://192.168.185.10:3000
    ports:
      - "3000:3000"
    depends_on:
      - mysql

@ziptx
Copy link

ziptx commented Sep 15, 2021

Try specifying a database version below MariaDB 10.6.   There seems to be a breaking bug in 10.6.  See bug #681

@robinlennox
Copy link

Docker Compose Example to get around bug #681

Note: Need to use 10.4 until the bug is fixed.

version: '3'

services:
  mysql:
    image: mariadb:10.4
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
      MYSQL_DATABASE: semaphore
      MYSQL_USER: semaphore
      MYSQL_PASSWORD: semaphore

  semaphore:
    image: ansiblesemaphore/semaphore
    environment:
      SEMAPHORE_DB_USER: semaphore
      SEMAPHORE_DB_PASS: semaphore
      SEMAPHORE_DB_HOST: mysql
      SEMAPHORE_DB_PORT: 3306
      SEMAPHORE_DB: semaphore
      SEMAPHORE_PLAYBOOK_PATH: /etc/semaphore
      SEMAPHORE_ADMIN_PASSWORD: password
      SEMAPHORE_ADMIN_NAME: "Developer"
      SEMAPHORE_ADMIN_EMAIL: admin@localhost
      SEMAPHORE_ADMIN: admin
      SEMAPHORE_WEB_ROOT: http://127.0.0.1:3000
    ports:
      - "3000:3000"
    depends_on:
      - mysql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants