Skip to main content

With local database

Database

You can deploy the server using a local database within a Docker container. Use the following template for the database. Name the YAML file docker-compose-db.yml.

services:
db:
image: postgres:latest
container_name: smart-grow-db
restart: always
environment:
POSTGRES_USER: ${SMART_GROW_DB_USER}
POSTGRES_PASSWORD: ${SMART_GROW_DB_PASSWORD}
POSTGRES_DB: ${SMART_GROW_DB_NAME}
volumes:
- db_data:/var/lib/postgresql/data
networks:
- database

volumes:
db_data:

networks:
database:
external: true

Server

This configuration installs the Smart Grow server along with the Nginx reverse proxy. If you have a different network setup, you can remove the proxy image. Name the file docker-compose.yml.

services:
smart-grow-server:
image: "smartdevcorp/smart-grow-server:6.0.0"
container_name: smart-grow-server
env_file:
- .env
restart: always
depends_on:
- proxy-manager
networks:
- proxy
- database

proxy-manager:
image: "jc21/nginx-proxy-manager:latest"
container_name: proxy
restart: always
ports:
- "80:80"
- "81:81"
- "443:443"
volumes:
- ./proxy_data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
- proxy

networks:
proxy:
external: true
database:
external: true