n0bility6/timetrex
Image for Timetrex application and tested on version v10.0.0 community edition
113
docker-compose.yaml or docker-stack.yaml
version: "3.7"
services:
timetrex:
image: n0bility6/timetrex:latest
volumes:
- ./html:/var/www/html #Location of Timetrex application
ports:
- 8080:80
networks:
- web
database:
image: postgres:9.5.22-alpine
environment:
POSTGRES_USER: timetrex_user
POSTGRES_PASSWORD: timetrex_password
POSTGRES_DB: timetrex_db
volumes:
- ./backup/init.sql:/docker-entrypoint-initdb.d/init.sql #Remove this after restoration and restart container
- ./backup/timetrex_db.sql:/docker-entrypoint-initdb.d/timetrex_db.sql #Remove this after restoration and restart container
- ./database:/var/lib/postgresql #Persistent volume of Postgresql
networks:
- web
networks:
web:
external: true
init.sql
CREATE USER postgres WITH PASSWORD 'postgres';
GRANT ALL PRIVILEGES ON DATABASE postgres TO postgres;
ALTER DATABASE postgres OWNER to postgres;
GRANT ALL PRIVILEGES ON DATABASE timetrex_db TO timetrex_user;
--CREATE DATABASE timetrex_db;
--GRANT ALL PRIVILEGES ON DATABASE postgres TO postgres;
Dockerfile
FROM ubuntu:16.04
MAINTAINER rey.escasa@yahoo.com
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt-get install -y git vim apache2 libapache2-mod-php php php7.0-cgi php7.0-cli php7.0-pgsql php7.0-pspell php7.0-gd php7.0-gettext php7.0-imap php7.0-intl php7.0-json php7.0-soap php7.0-zip php7.0-curl php7.0-ldap php7.0-xml php7.0-xsl php7.0-mbstring php7.0-bcmath
EXPOSE 80
CMD /usr/sbin/apachectl -D "FOREGROUND"
docker pull n0bility6/timetrex