diff --git a/.gitignore b/.gitignore index 1014ade9..e4531d40 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,6 @@ images/data/ data/ images/.env images/tiler.yml -values.dev.yaml \ No newline at end of file +values.dev.yaml +secrets +tegola \ No newline at end of file diff --git a/compose/tiler.yml b/compose/tiler.yml new file mode 100644 index 00000000..054efd6b --- /dev/null +++ b/compose/tiler.yml @@ -0,0 +1,15 @@ +version: '3.8' +services: + tiler: + image: ohm-tiler-server:v1 + build: + context: ../images/tiler-server + dockerfile: Dockerfile + volumes: + - ../data/tiler-server-data:/mnt/data + - ../images/tiler-server:/app + ports: + - "9090:9090" + env_file: + - ../envs/.env.tiler.example + restart: always diff --git a/images/docker-compose.yml b/compose/web.yml similarity index 69% rename from images/docker-compose.yml rename to compose/web.yml index c9e1645f..ad5c56a3 100644 --- a/images/docker-compose.yml +++ b/compose/web.yml @@ -1,26 +1,26 @@ -version: '3.4' +version: '3.8' services: db: platform: linux/amd64 image: osmseed-db:v1 build: - context: ../images/db + context: ./../images/db dockerfile: Dockerfile ports: - '5432:5432' volumes: - ./data/db-data:/var/lib/postgresql/data env_file: - - ./.env.example + - ./.env.web.example web: image: osmseed-web:v1 build: - context: ./web + context: ./../images/web dockerfile: Dockerfile ports: - '80:80' env_file: - - ./.env.example + - ./.env.web.example ####### Enable for development mode # volumes: - # - ./../../ohm-website:/var/www \ No newline at end of file + # - ./../../ohm-website:/var/www diff --git a/envs/.env.tiler.example b/envs/.env.tiler.example new file mode 100644 index 00000000..83a37062 --- /dev/null +++ b/envs/.env.tiler.example @@ -0,0 +1,23 @@ +####################################### +# Environment variables for tiler database +####################################### +POSTGRES_HOST=host.docker.internal +POSTGRES_DB=tiler-osm +POSTGRES_USER=postgres +POSTGRES_PASSWORD=1234 +POSTGRES_PORT=5432 +POSTGRES_DB_MAX_CONNECTIONS=200 + +# ####################################### +# tiler-serve env variables, +# ####################################### +TILER_SERVER_PORT=9090 +TILER_CACHE_BASEPATH=/mnt/data +TILER_CACHE_MAX_ZOOM=22 +TILER_CACHE_TYPE=file +TILER_CACHE_TYPE=file +TILER_CACHE_BUCKET=osmseed-staging +TILER_CACHE_BASEPATH=tegola +TILER_CACHE_REGION=us-east-1 +TILER_CACHE_AWS_ACCESS_KEY_ID=... +TILER_CACHE_AWS_SECRET_ACCESS_KEY=... diff --git a/envs/.env.web.example b/envs/.env.web.example new file mode 100644 index 00000000..7b1f3126 --- /dev/null +++ b/envs/.env.web.example @@ -0,0 +1,7 @@ +POSTGRES_DB=openstreetmap +POSTGRES_PASSWORD=abcd +POSTGRES_USER=postgres +POSTGRES_PORT=5432 +POSTGRES_HOST=host.docker.internal +SERVER_URL=localhost +SERVER_PROTOCOL=http \ No newline at end of file