Giter Club home page Giter Club logo

traccar-google-cloud-sql's Introduction

Traccar with built in Google Cloud SQL MySQL & Postgresql connectors

Perfect for Cloud Run as the Traccar config file has been replaced with environment variables.

Run on Google Cloud

How to use

You can simply run the Docker image: inlustra/traccar-google-cloud-sql with the required env vars below.

It will default to the Google Cloud SQL MySQL connector, if you are using MySQL, the only env vars required are:

  • DATABASE_USERNAME
  • DATABASE_PASSWORD
  • DATABASE_NAME
  • CONNECTION_NAME

Possible environment variables:

Name Description Required
DATABASE_USERNAME Cloud SQL database user true
DATABASE_PASSWORD Cloud SQL database password true
DATABASE_NAME Cloud SQL database name true
CONNECTION_NAME Go to your Cloud SQL page, create a database and copy the 'Connection Name', it looks something like: myproject:mylocation:mydbname true
DATABASE_TYPE Used to auto configure the advanced variables, supported options are: 'mysql' (Default), 'postgresql' or 'custom' (Advanced) false
DATABASE_PROTOCOL Advanced, if DATABASE_TYPE is set to custom, used to manually create JDBC url false
DATABASE_DRIVER Advanced, if DATABASE_TYPE is set to custom, you can only use those drivers supported by Traccar or loaded via DRIVER_FILE false
DATABASE_SOCKET_FACTORY Advanced, if DATABASE_TYPE is set to custom, allows loading a custom socket factory via JDBC url false
ENABLE_IAM_AUTH Used to set enableIamAuth on postgresql socket connections false
JDBC_URL_OPTIONS Advanced, if DATABASE_TYPE is set to custom, You can use this to append to the JDBC URL, the default URL is: 'jdbc:${DATABASE_TYPE}:///${DATABASE_NAME}?socketFactory=${DATABASE_SOCKET_FACTORY}&cloudSqlInstance=${CONNECTION_NAME}&unixSocketPath=/cloudsql/${CONNECTION_NAME}${JDBC_URL_OPTIONS}' false

Note

  • You'll notice that the & symbols have been escaped - Remember, for the username and password you'll have to do the same (I'd recommend avoiding any XML-escape-required characters)

traccar-google-cloud-sql's People

Contributors

inlustra avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.