reorganize production containers
This commit is contained in:
@@ -46,87 +46,3 @@ docker compose -f traefik.yaml up -d
|
||||
docker compose -f docker-compose.production.yml up --build -d
|
||||
|
||||
|
||||
|
||||
services:
|
||||
gitlab:
|
||||
image: gitlab/gitlab-ce:latest
|
||||
restart: unless-stopped
|
||||
hostname: ${DOMAIN_NAME}
|
||||
|
||||
# Traefik will handle 80/443 on the host.
|
||||
# Keep SSH exposed separately (pick a fixed port on the host).
|
||||
ports:
|
||||
- "2222:22"
|
||||
|
||||
environment:
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
# Public URL should be HTTPS (Traefik terminates TLS)
|
||||
external_url 'https://${DOMAIN_NAME}'
|
||||
|
||||
# GitLab listens internally on HTTP; Traefik provides HTTPS
|
||||
nginx['listen_port'] = 80
|
||||
nginx['listen_https'] = false
|
||||
|
||||
# Help GitLab understand it's behind a TLS-terminating proxy
|
||||
nginx['proxy_set_headers'] = {
|
||||
"X-Forwarded-Proto" => "https",
|
||||
"X-Forwarded-Ssl" => "on"
|
||||
}
|
||||
|
||||
gitlab_rails['initial_root_password'] = '${ROOT_PASSWORD}'
|
||||
|
||||
# -------------------------
|
||||
# SMTP (required for invites)
|
||||
# -------------------------
|
||||
gitlab_rails['smtp_enable'] = true
|
||||
gitlab_rails['smtp_address'] = "${SMTP_HOST}"
|
||||
gitlab_rails['smtp_port'] = ${SMTP_PORT}
|
||||
gitlab_rails['smtp_user_name'] = "${SMTP_USER}"
|
||||
gitlab_rails['smtp_password'] = "${SMTP_PASS}"
|
||||
gitlab_rails['smtp_domain'] = "${SMTP_DOMAIN}"
|
||||
gitlab_rails['smtp_authentication'] = "login"
|
||||
gitlab_rails['smtp_enable_starttls_auto'] = true
|
||||
|
||||
# Optional: if you use port 465 (implicit TLS), set:
|
||||
# gitlab_rails['smtp_tls'] = true
|
||||
|
||||
gitlab_rails['gitlab_email_from'] = "${SMTP_FROM}"
|
||||
gitlab_rails['gitlab_email_reply_to'] = "${SMTP_REPLY_TO}"
|
||||
|
||||
GITLAB_ROOT_EMAIL: ${ROOT_EMAIL}
|
||||
|
||||
volumes:
|
||||
- gitlab-config:/etc/gitlab
|
||||
- gitlab-logs:/var/log/gitlab
|
||||
- gitlab-data:/var/opt/gitlab
|
||||
|
||||
shm_size: '256m'
|
||||
sysctls:
|
||||
- net.ipv6.conf.all.disable_ipv6=1
|
||||
- net.ipv6.conf.default.disable_ipv6=1
|
||||
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.gitlab.rule=Host(`${DOMAIN_NAME}`)
|
||||
- traefik.http.routers.gitlab.tls=true
|
||||
- traefik.http.routers.gitlab.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.gitlab.loadbalancer.server.port=80
|
||||
|
||||
networks:
|
||||
- traefik-proxy
|
||||
|
||||
# ✅ Fixed logging configuration (moved inside the service)
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "50m"
|
||||
max-file: "3"
|
||||
|
||||
volumes:
|
||||
gitlab-config:
|
||||
gitlab-logs:
|
||||
gitlab-data:
|
||||
|
||||
networks:
|
||||
traefik-proxy:
|
||||
external: true
|
||||
@@ -63,11 +63,18 @@ services:
|
||||
- traefik.http.routers.api.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.api.loadbalancer.server.port=4000
|
||||
|
||||
marketplace:
|
||||
# homepage (public-site, port 3003) + marketplace (port 3000) in one container
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.production
|
||||
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/marketplace"]
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
npm run start --workspace @rentaldrivego/public-site &
|
||||
npm run start --workspace @rentaldrivego/marketplace &
|
||||
wait -n
|
||||
networks:
|
||||
- internal
|
||||
- traefik-proxy
|
||||
@@ -78,30 +85,18 @@ services:
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
# homepage → public-site-svc (port 3003)
|
||||
- traefik.http.routers.public-site.rule=Host(`${PUBLIC_SITE_DOMAIN}`)
|
||||
- traefik.http.routers.public-site.entrypoints=websecure
|
||||
- traefik.http.routers.public-site.tls.certresolver=letsencrypt
|
||||
- traefik.http.routers.public-site.service=public-site-svc
|
||||
- traefik.http.services.public-site-svc.loadbalancer.server.port=3003
|
||||
# marketplace → marketplace-svc (port 3000)
|
||||
- traefik.http.routers.marketplace.rule=Host(`${MARKETPLACE_DOMAIN}`)
|
||||
- traefik.http.routers.marketplace.entrypoints=websecure
|
||||
- traefik.http.routers.marketplace.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.marketplace.loadbalancer.server.port=3000
|
||||
|
||||
dashboard:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.production
|
||||
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/dashboard"]
|
||||
networks:
|
||||
- internal
|
||||
- traefik-proxy
|
||||
depends_on:
|
||||
- api
|
||||
env_file:
|
||||
- .env.docker.production
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.dashboard.rule=Host(`${DASHBOARD_DOMAIN}`)
|
||||
- traefik.http.routers.dashboard.entrypoints=websecure
|
||||
- traefik.http.routers.dashboard.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.dashboard.loadbalancer.server.port=3001
|
||||
- traefik.http.routers.marketplace.service=marketplace-svc
|
||||
- traefik.http.services.marketplace-svc.loadbalancer.server.port=3000
|
||||
|
||||
admin:
|
||||
build:
|
||||
@@ -123,11 +118,11 @@ services:
|
||||
- traefik.http.routers.admin.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.admin.loadbalancer.server.port=3002
|
||||
|
||||
public-site:
|
||||
dashboard:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.production
|
||||
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/public-site"]
|
||||
command: ["npm", "run", "start", "--workspace", "@rentaldrivego/dashboard"]
|
||||
networks:
|
||||
- internal
|
||||
- traefik-proxy
|
||||
@@ -138,10 +133,10 @@ services:
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.public-site.rule=Host(`${PUBLIC_SITE_DOMAIN}`)
|
||||
- traefik.http.routers.public-site.entrypoints=websecure
|
||||
- traefik.http.routers.public-site.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.public-site.loadbalancer.server.port=3003
|
||||
- traefik.http.routers.dashboard.rule=Host(`${DASHBOARD_DOMAIN}`)
|
||||
- traefik.http.routers.dashboard.entrypoints=websecure
|
||||
- traefik.http.routers.dashboard.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.dashboard.loadbalancer.server.port=3001
|
||||
|
||||
pgmanage:
|
||||
image: cmdpromptinc/pgmanage-enterprise:latest
|
||||
|
||||
Reference in New Issue
Block a user