mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 19:27:18 +02:00
Finished simpleicons implementation
This commit is contained in:
16
roles/docker-simpleicons/templates/Dockerfile.j2
Normal file
16
roles/docker-simpleicons/templates/Dockerfile.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM node:latest AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./config/package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
FROM node:latest
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY ./config/server.js .
|
||||
|
||||
EXPOSE {{ container_port }}
|
||||
|
||||
CMD ["node", "server.js"]
|
@@ -6,9 +6,9 @@
|
||||
image: simpleicons-server:latest
|
||||
container_name: simpleicons-server
|
||||
ports:
|
||||
- "{{ports.localhost.http[application_id]}}:3000"
|
||||
- "{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
|
||||
|
1
roles/docker-simpleicons/templates/env.j2
Normal file
1
roles/docker-simpleicons/templates/env.j2
Normal file
@@ -0,0 +1 @@
|
||||
{# This file just exists, because the framework requests it. #}
|
9
roles/docker-simpleicons/templates/package.json.j2
Normal file
9
roles/docker-simpleicons/templates/package.json.j2
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "simpleicons-server",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2",
|
||||
"simple-icons": "^9.0.0",
|
||||
"sharp": "^0.32.0"
|
||||
}
|
||||
}
|
@@ -3,7 +3,7 @@ import * as icons from 'simple-icons';
|
||||
import sharp from 'sharp';
|
||||
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
const port = {{ container_port }};
|
||||
|
||||
// Helper: convert 'nextcloud' → 'siNextcloud'
|
||||
function getExportName(slug) {
|
||||
@@ -15,7 +15,7 @@ function getExportName(slug) {
|
||||
|
||||
// Root: redirect to your documentation
|
||||
app.get('/', (req, res) => {
|
||||
res.redirect('https://docs.cymais.cloud/roles/docker-{{ application_id }}/README.html');
|
||||
res.redirect('{{ domains | get_url('sphinx', web_protocol) }}/roles/docker-{{ application_id }}/README.html');
|
||||
});
|
||||
|
||||
// GET /:slug.svg
|
||||
|
Reference in New Issue
Block a user