「✨」 feat: fuck bash
This commit is contained in:
79
flake.lock
generated
Normal file
79
flake.lock
generated
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733312601,
|
||||||
|
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1735834308,
|
||||||
|
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733096140,
|
||||||
|
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pogit": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733518808,
|
||||||
|
"narHash": "sha256-tKqXoNTG1PGOnHjb6UvkSpKOZFDXDmZt1p0mw5Cic58=",
|
||||||
|
"owner": "y-syo",
|
||||||
|
"repo": "pogit",
|
||||||
|
"rev": "c3cb3fa9aefcf9e065ee27f2daa62a3826d48169",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "y-syo",
|
||||||
|
"repo": "pogit",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pogit": "pogit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
30
flake.nix
30
flake.nix
@ -1,9 +1,33 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
pogit = {
|
||||||
|
url = "github:y-syo/pogit";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = inputs@{ nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||||
|
default = pkgs.mkShell.override
|
||||||
|
{}
|
||||||
|
{
|
||||||
|
buildInputs = with pkgs;[
|
||||||
|
|
||||||
};
|
];
|
||||||
|
packages = with pkgs; [
|
||||||
|
git
|
||||||
|
vault
|
||||||
|
inputs.pogit.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,21 +4,20 @@ LABEL version="0.1"
|
|||||||
LABEL maintainer="KeyZox"
|
LABEL maintainer="KeyZox"
|
||||||
|
|
||||||
RUN groupadd --gid 999 -r mysql \
|
RUN groupadd --gid 999 -r mysql \
|
||||||
&& useradd -r -g mysql mysql --home-dir /var/lib/mysql --uid 999
|
&& useradd -r -g mysql mysql --home-dir /var/lib/mysql --uid 999 \
|
||||||
|
&& echo 'permit nopass root as mysql' >> /etc/doas.conf
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
|
COPY --chmod=0644 docker.cnf /etc/my.cnf.d/
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk add --no-cache mariadb gosu tzdata \
|
&& apk add --no-cache mariadb tzdata doas \
|
||||||
&& gosu --version \
|
|
||||||
&& gosu nobody true \
|
|
||||||
|
|
||||||
VOLUME /var/lib/mysql
|
VOLUME /var/lib/mysql
|
||||||
|
|
||||||
COPY healthcheck.sh /healthcheck.sh
|
COPY --chmod=0741 healthcheck.sh /healthcheck.sh
|
||||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
COPY --chmod=0741 docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
RUN [ "chmod", "+x", "/docker-entrypoint.sh" ]
|
|
||||||
RUN [ "chmod", "+x", "/healthcheck.sh" ]
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
WORKDIR /var/lib/mysql
|
WORKDIR /var/lib/mysql
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
exec $@
|
exec "$@"
|
||||||
|
14
srcs/requirements/mariadb/docker.cnf
Normal file
14
srcs/requirements/mariadb/docker.cnf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Ubuntu container compatibility
|
||||||
|
|
||||||
|
[mariadb]
|
||||||
|
host-cache-size=0
|
||||||
|
skip-name-resolve
|
||||||
|
|
||||||
|
expire_logs_days=10
|
||||||
|
|
||||||
|
|
||||||
|
[client-server]
|
||||||
|
socket=/run/mariadb/mariadb.sock
|
||||||
|
|
||||||
|
!includedir /etc/mysql/mariadb.conf.d
|
||||||
|
!includedir /etc/mysql/conf.d
|
1
srcs/requirements/mariadb/healthcheck.sh
Normal file
1
srcs/requirements/mariadb/healthcheck.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
@ -1,3 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Reference in New Issue
Block a user