$ cp .env.example .env # and modify
$ alias dc=docker-compose
$ dc up -d
extern | router | docker | service |
---|---|---|---|
80 | 8070 | 80 | nginx |
443 | 8071 | 443 | nginx |
22 | 4242 | 22 | git+ssh |
PUID=1000 # id -u | |
PGID=1000 # id -g | |
EXTERNAL_HOSTNAME=your-hostname.duckdns.org | |
DUCKDNS_TOKEN="" # visit https://www.duckdns.org/ create an account, copy your token | |
EMAIL=[email protected] | |
GITLAB_HOME=./gitlab | |
GITLAB_ROOT_PASSWORD=password |
services: | |
swag: | |
image: "linuxserver/swag:1.22.0" | |
cap_add: | |
- NET_ADMIN | |
volumes: | |
- "./config:/config" | |
ports: | |
- "8070:80" | |
- "8071:443" | |
environment: | |
PUID: "${PUID}" | |
PGID: "${PGID}" | |
TZ: "UTC" | |
URL: "${EXTERNAL_HOSTNAME}" | |
SUBDOMAINS: "wildcard" | |
VALIDATION: "duckdns" | |
DUCKDNSTOKEN: "${DUCKDNS_TOKEN}" | |
EMAIL: "${EMAIL}" | |
restart: unless-stopped | |
duckdns: | |
image: "linuxserver/duckdns:latest" | |
environment: | |
TZ: "UTC" | |
SUBDOMAINS: "${EXTERNAL_HOSTNAME}" | |
TOKEN: "${DUCKDNS_TOKEN}" | |
restart: unless-stopped | |
gitlab: | |
image: "gitlab/gitlab-ce:14.5.2-ce.0" | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url "https://gitlab.${EXTERNAL_HOSTNAME}" | |
nginx["listen_port"] = 80 | |
nginx["listen_https"] = false | |
grafana["enable"] = false | |
letsencrypt["enable"] = false | |
prometheus_monitoring["enable"] = false | |
puma["worker_processes"] = 2 | |
sidekiq["max_concurrency"] = 10 | |
gitlab_rails["initial_root_password"] = "${GITLAB_ROOT_PASSWORD}" | |
ports: | |
- "4242:22" | |
volumes: | |
- "${GITLAB_HOME}/config:/etc/gitlab" | |
- "${GITLAB_HOME}/logs:/var/log/gitlab" | |
- "${GITLAB_HOME}/data:/var/opt/gitlab" | |
restart: unless-stopped |
# filename: config/nginx/site-confs/gitlab.conf | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name gitlab.*; | |
include /config/nginx/ssl.conf; | |
client_max_body_size 0; | |
location / { | |
include /config/nginx/proxy.conf; | |
include /config/nginx/resolver.conf; | |
proxy_pass http://gitlab:80; | |
} | |
} |