Nixius
/
template
Template
2
1
Fork 0

Add temp directory for local testing, update gitignore, and add documentation

This commit is contained in:
Leopere 2025-03-27 09:54:02 -04:00
parent 0e7cbe8d91
commit 173d9484af
6 changed files with 59 additions and 37 deletions

View File

@ -1,7 +1,7 @@
# The only stuff that happens here is midtownplaydio gets replaced and so does possibly nixius
# The only stuff that happens here is template gets replaced and so does possibly nixius
services:
midtownplaydio:
template:
build:
context: ./docker/midtownplaydio
context: ./docker/template
dockerfile: Dockerfile.production
image: git.nixc.us/nixius/midtownplaydio:production
image: git.nixc.us/nixius/template:production

View File

@ -1,7 +1,7 @@
# The only stuff that happens here is midtownplaydio gets replaced and so does possibly nixius
# The only stuff that happens here is template gets replaced and so does possibly nixius
services:
midtownplaydio:
template:
build:
context: ./docker/midtownplaydio
dockerfile: Dockerfile
image: git.nixc.us/colin/midtownplaydio:staging
context: ./docker/template
dockerfile: Dockerfile.staging
image: git.nixc.us/colin/template:staging

View File

@ -1 +0,0 @@
# This is the Dockerfile where most stuff gets added for stating then production virtually nothing should go into Dockerfile.production outside of args and env's Clean up this comment.

View File

@ -1,2 +0,0 @@
# This should almost never need more than this line but can if absolutely necessary.
FROM git.nixc.us/nixius/midtownplaydio:staging

View File

@ -3,6 +3,35 @@ networks:
external: true
services:
template:
image: git.nixc.us/nixius/template:production
deploy:
replicas: 1
restart_policy:
condition: on-failure
max_attempts: 3
update_config:
parallelism: 1
delay: 10s
order: start-first
rollback_config:
parallelism: 1
delay: 10s
order: stop-first
networks:
- traefik_network
labels:
- traefik.enable=true
- traefik.http.routers.production_template.rule=Host(`template.nixc.us`)
- traefik.http.routers.production_template.entrypoints=websecure
- traefik.http.routers.production_template.tls=true
- traefik.http.routers.production_template.tls.certresolver=letsencryptresolver
- traefik.http.services.production_template.loadbalancer.server.port=3000
# - traefik.http.services.production_template.loadbalancer.healthcheck.path=/health
# - traefik.http.services.production_template.loadbalancer.healthcheck.interval=30s
# - traefik.http.services.production_template.loadbalancer.healthcheck.timeout=5s
- traefik.http.routers.production_template.middlewares=secure-headers
midtownplaydio:
image: git.nixc.us/nixius/midtownplaydio:production
networks:
@ -23,6 +52,7 @@ services:
traefik.http.routers.production_midtownplaydio.entrypoints: "websecure"
traefik.http.routers.production_midtownplaydio.tls: "true"
traefik.http.routers.production_midtownplaydio.tls.certresolver: "letsencryptresolver"
traefik.http.routers.production_midtownplaydio.middlewares: "secure-headers"
traefik.http.services.production_midtownplaydio.loadbalancer.server.port: "3000"
traefik.docker.network: "traefik"
# traefik.http.services.production_midtownplaydio.loadbalancer.healthcheck.path: "/health"
@ -39,6 +69,3 @@ services:
traefik.http.middlewares.secure-headers.headers.browserXssFilter: "true"
traefik.http.middlewares.secure-headers.headers.referrerPolicy: "no-referrer"
traefik.http.middlewares.secure-headers.headers.featurePolicy: "camera 'none'; geolocation 'none'; microphone 'none'; payment 'none'; usb 'none'; vr 'none'"
# Attach security headers middleware to the router
traefik.http.routers.production_midtownplaydio.middlewares: "secure-headers"

View File

@ -4,32 +4,30 @@ networks:
default:
services:
midtownplaydio:
image: git.nixc.us/nixius/midtownplaydio:staging
networks:
- traefik
- default
template:
image: git.nixc.us/nixius/template:staging
deploy:
replicas: 1
placement:
constraints:
- node.hostname == ingress.nixc.us
preferences:
- spread: node.id
restart_policy:
condition: on-failure
max_attempts: 3
update_config:
delay: 20s
parallelism: 1
delay: 10s
order: start-first
rollback_config:
parallelism: 1
delay: 10s
order: stop-first
networks:
- traefik_network
labels:
traefik.enable: "true"
traefik.http.routers.staging_midtownplaydio.rule: "Host(`staging.midtownplaydio.nixc.us`)"
traefik.http.routers.staging_midtownplaydio.entrypoints: "websecure"
traefik.http.routers.staging_midtownplaydio.tls: "true"
traefik.http.routers.staging_midtownplaydio.tls.certresolver: "letsencryptresolver"
traefik.http.services.staging_midtownplaydio.loadbalancer.server.port: "3000"
traefik.docker.network: "traefik"
# traefik.http.services.staging_midtownplaydio.loadbalancer.healthcheck.path: "/health"
# traefik.http.services.staging_midtownplaydio.loadbalancer.healthcheck.interval: "30s"
# traefik.http.services.staging_midtownplaydio.loadbalancer.healthcheck.timeout: "5s"
- traefik.enable=true
- traefik.http.routers.staging_template.rule=Host(`staging.template.nixc.us`)
- traefik.http.routers.staging_template.entrypoints=websecure
- traefik.http.routers.staging_template.tls=true
- traefik.http.routers.staging_template.tls.certresolver=letsencryptresolver
- traefik.http.services.staging_template.loadbalancer.server.port=3000
# - traefik.http.services.staging_template.loadbalancer.healthcheck.path=/health
# - traefik.http.services.staging_template.loadbalancer.healthcheck.interval=30s
# - traefik.http.services.staging_template.loadbalancer.healthcheck.timeout=5s