-
Notifications
You must be signed in to change notification settings - Fork 9
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
gitlab starts #10
base: master
Are you sure you want to change the base?
gitlab starts #10
Conversation
191eefe
to
d1f0644
Compare
97fd63e
to
0904991
Compare
0904991
to
e3ff9c1
Compare
6bdbdcd
to
e3ff9c1
Compare
POSTGRES_PASS=password | ||
POSTGRES_DB_NAME=gitlab_production | ||
GITLAB_ROOT_PASSWORD=changeme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passwords should be blank in .env-dist, otherwise the Makefile won't randomize it.
|
||
## Initial setup | ||
|
||
Bring up the service with `docker-compose up -d` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use the make
style to describe how to bringing up the service.
make config
make install
make open
test: | ||
[ | ||
"CMD-SHELL", | ||
"pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB_NAME" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is double $$ correct here?
- "traefik.http.routers.gitlab-web.rule=Host(`${GITLAB_TRAEFIK_HOST}`)" | ||
- "traefik.http.routers.gitlab-web.entrypoints=websecure" | ||
- "traefik.http.routers.gitlab-web.service=gitlab-web" | ||
- "traefik.http.routers.gitlab-web.tls.certresolver=${ACME_CERT_RESOLVER}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
certresolvers aren't needed anymore that we are using manual cert creation with make certs
- "traefik.http.services.gitlab-web.loadbalancer.server.port=80" | ||
## SSH | ||
- "traefik.tcp.routers.gitlab-ssh.rule=HostSNI(`*`)" | ||
- "traefik.tcp.routers.gitlab-ssh.entrypoints=ssh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ssh
is the same entrypoint that gitea uses, its on port 2222. Did you mean to use a different entrypoint on port 2224 (this requires modifying the traefik config)? I don't know why you would need to run both gitea and gitlab on the same machine, so maybe sharing the same entrypoint is the right thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d.rymcg.tech/traefik/config/traefik.yml
Lines 115 to 118 in 9728d87
#@ if data.values.ssh_entrypoint_enabled == "true": | |
ssh: | |
address: #@ data.values.ssh_entrypoint_host + ":" + data.values.ssh_entrypoint_port | |
#@ end |
POSTGRES_PORT=5432 | ||
POSTGRES_PASS=password | ||
POSTGRES_DB_NAME=gitlab_production | ||
GITLAB_ROOT_PASSWORD=changeme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -5,5 +5,5 @@ include ../_scripts/Makefile.projects | |||
config: | |||
@${BIN}/reconfigure_ask ${ENV_FILE} GITLAB_TRAEFIK_HOST "Enter your gitlab domain name" "gl.${ROOT_DOMAIN}" | |||
@${BIN}/reconfigure_ask ${ENV_FILE} APP_NAME "Enter the service description" "git thing" | |||
@${BIN}/reconfigure ${ENV_FILE} POSTGRES_PASS=$(shell openssl rand -hex 45) | |||
@${BIN}/reconfigure ${ENV_FILE} GITLAB_ROOT_PASSWORD=$(shell openssl rand -hex 45) | |||
@[[ -z "$$(dotenv -f ${ENV_FILE} get POSTGRES_PASS)" ]] && ${BIN}/reconfigure ${ENV_FILE} POSTGRES_PASS=$(shell openssl rand -hex 45) || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotenv should be ${BIN}/dotenv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can now use the reconfigure_password script instead of this.
@${BIN}/reconfigure_password ${ENV_FILE} POSTGRES_PASS
GITLAB_TRAEFIK_HOST=git.example.com | ||
GITLAB_SSH_PORT=2224 | ||
# Choose Let's Encrypt 'staging' or 'production' environment: | ||
ACME_CERT_RESOLVER=production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACME_CERT_RESOLVER is no longer used
# Choose Let's Encrypt 'staging' or 'production' environment: | ||
ACME_CERT_RESOLVER=production | ||
|
||
POSTGRES_USER=gitlab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should all be namespaced like GITLAB_POSTGRES_USER
(In theory, you should be able to concatenate all of the d.rymcg.tech project .env files together into one and not have any overlaps)
- "traefik.http.routers.gitlab-web.entrypoints=websecure" | ||
- "traefik.http.routers.gitlab-web.service=gitlab-web" | ||
- "traefik.http.routers.gitlab-web.tls.certresolver=${ACME_CERT_RESOLVER}" | ||
- "traefik.http.services.gitlab-web.loadbalancer.server.port=80" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server.port is not required as long as the image properly specified an EXPOSE
in its Dockerfile, traefik will autodetect the port.
## Web | ||
- "traefik.http.routers.gitlab-web.rule=Host(`${GITLAB_TRAEFIK_HOST}`)" | ||
- "traefik.http.routers.gitlab-web.entrypoints=websecure" | ||
- "traefik.http.routers.gitlab-web.service=gitlab-web" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifying the service is not necessary, traefik will autodetect this.
] | ||
gitlab: | ||
image: gitlab/gitlab-ce:latest | ||
container_name: gitlab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the container name to support multiple instances.
GITLAB_OMNIBUS_CONFIG: | | ||
gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_SSH_PORT} | ||
networks: | ||
- traefik-proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're not using the traefik-proxy network anymore, no networks need to be configured.
No description provided.