initial commit

This commit is contained in:
Harish Karumuthil 2024-09-11 02:22:36 +05:30
commit 27218a53d0
2 changed files with 52 additions and 0 deletions

33
Dockerfile Normal file
View File

@ -0,0 +1,33 @@
FROM chialab/php:8.3-apache
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
systemd systemd-sysv dbus dbus-user-session
RUN cd /lib/systemd/system/sysinit.target.wants/ \
&& rm $(ls | grep -v systemd-tmpfiles-setup)
RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/basic.target.wants/* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp*
RUN apt-get install -y --no-install-recommends procps iproute2 vim openssh-server;\
rm /var/log/apache2/* ;\
systemctl enable apache2
EXPOSE 80/tcp
EXPOSE 22/tcp
STOPSIGNAL SIGRTMIN+3
VOLUME [ "/var/log/apache2/", "/var/www/" ]
ENTRYPOINT [ "/lib/systemd/systemd", "--log-target=console" ]

19
docker-compose.yml Normal file
View File

@ -0,0 +1,19 @@
version: "3.4"
services:
os:
build:
dockerfile: ./Dockerfile
context: ./
tty: true
environment:
myenv: 1
container: podman
SITE_DOMAIN: site1.example.com
labels:
- traefik.enable=true
- 'traefik.http.routers.mydeb.rule=Host(`${SITE_DOMAIN}`)'
- traefik.http.services.mydeb.loadbalancer.server.port=80
- traefik.http.routers.mydeb.tls=true
- traefik.http.routers.mydeb.tls.certresolver=letsencrypt
# entrypoint: [ "systemd", "--log-target=console" ]
# command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"]