From 548e69d3f3ddb0fa8873e08fd8252c5235ebb97a Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Fri, 21 Sep 2018 12:05:55 -0500 Subject: [PATCH] update limits --- docker/Dockerfile | 6 ++++-- var/systemd_prod_unit | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 var/systemd_prod_unit diff --git a/docker/Dockerfile b/docker/Dockerfile index e216cac..284be06 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,8 +11,10 @@ RUN apt-get -y install golang RUN useradd -m runner -RUN echo '@runner soft nproc 16' >> /etc/security/limits.conf -RUN echo '@runner hard nproc 16' >> /etc/security/limits.conf +RUN echo 'runner soft nproc 16' >> /etc/security/limits.conf +RUN echo 'runner hard nproc 16' >> /etc/security/limits.conf +RUN echo 'runner soft nofile 128' >> /etc/security/limits.conf +RUN echo 'runner hard nofile 128' >> /etc/security/limits.conf USER runner WORKDIR /tmp diff --git a/var/systemd_prod_unit b/var/systemd_prod_unit new file mode 100644 index 0000000..f6e6ae5 --- /dev/null +++ b/var/systemd_prod_unit @@ -0,0 +1,13 @@ +[Unit] +Description=Piston + +[Service] +Type=simple +User=root +Environment=PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin +WorkingDirectory=/root/piston/api +ExecStart=/root/piston/api/start +Restart=on-failure + +[Install] +WantedBy=multi-user.target