Making it container

This commit is contained in:
Jarkko Toivanen 2024-12-11 11:51:09 +02:00
parent 436fd4d2cd
commit 9e427dc56f
Signed by: jt
GPG key ID: 9151B109B73ECAD5
3 changed files with 27 additions and 0 deletions

3
Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM docker.io/php:apache
COPY src/ /var/www/html/

12
Makefile Normal file
View file

@ -0,0 +1,12 @@
current_dir := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
data/:
mkdir data
chmod 777 data
podman-run:
podman build -t snuffler/snuffler-web .
podman run -v ./data/:/var/www/html/data/ -p 8080:80 localhost/snuffler/snuffler-web:dev
docker-run:
docker build -t snuffler/snuffler-web:dev .
docker run -v $(current_dir)data/:/var/www/html/data/ -p 8080:80 snuffler/snuffler-web:dev

12
compose.yaml Normal file
View file

@ -0,0 +1,12 @@
version: '3'
services:
snuffler-web:
#image: snuffler/snuffler-web
container_name: snuffler-web
build:
context: .
dockerfile: Dockerfile
volumes:
- ./data/:/var/www/html/data/
ports:
- "8080:80"