Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Example: Docker + Traefik + Database

This example shows how to run solidtime with Docker, Traefik, and with a database inside the same docker compose.

Prerequisites

If you don't know how to set up Traefik with automatic configuration discovery via labels, you can use this guide.

Installation

  1. Copy the example files and adjust the environment variables to your needs
cp laravel.env.example laravel.env
cp .env.example .env
  1. (Only with Linux/Docker Engine) Correct the permissions of the app-storage and logs directories.
chown -R 1000:1000 app-storage logs

Follow further instructions on Self-Hosting Docs

Database access on the host machine

If you want to be able to access the database from the host machine, you need to expose the database port in the docker-compose.yml file.

Caution

Only do this if you are not exposing this port to the internet. You can block this for example via a security group in most cloud providers or via a firewall on your local machine.

Uncomment the following lines in the docker-compose.yml file:

  database:
    # ... other configuration
    ports:
      - '${FORWARD_DB_PORT:-5432}:5432'
    # ... other configuration

Set the FORWARD_DB_PORT environment variable to the port you want to use on the host machine

FORWARD_DB_PORT=5432