Merge pull request #29 from mjanez/ckan-2.9.8

Docker Logging
This commit is contained in:
mjanez 2023-04-17 12:27:00 +02:00 committed by GitHub
commit 46c5a37713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 84 additions and 7 deletions

2
.env
View File

@ -34,7 +34,7 @@ NGINX_PORT=80
NGINX_SSLPORT=443
# Apache HTTP Server
APACHE_VERSION=2.4
APACHE_VERSION=2.4-alpine
APACHE_PORT=80
APACHE_LOG_DIR=/var/log/apache
APACHE_SERVER_NAME=localhost

View File

@ -245,6 +245,8 @@ To have Docker Compose run automatically when you reboot a machine, you can foll
After=docker.service
[Service]
User=docker
Group=docker
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/path/to/project/ckan-docker/
@ -256,7 +258,7 @@ To have Docker Compose run automatically when you reboot a machine, you can foll
WantedBy=multi-user.target
```
2. Replace `/path/to/project/ckan-docker/` with the path where your project's `docker-compose.yml` file is located and and check the path to the docker compose binary on execution and stop: `/bin/docker`.
2. Replace `/path/to/project/ckan-docker/` with the path where your project's `docker-compose.yml` file is located and and check the path to the docker compose binary on execution and stop: `/bin/docker`. Also change the `User` / `Group` to execute the service.
3. Load the systemd service file with the following command:
```bash

View File

@ -13,7 +13,7 @@ ENV APACHE_SERVER_NAME=localhost
ENV APACHE_CKAN_LOCATION=/
ENV APACHE_PYCSW_LOCATION=/csw
ENV APACHE_PYCSW_PROXY_PASS=http://${PYCSW_CONTAINER_NAME}:${PYCSW_PORT_HOST}
ENV APACHE_PROXY_PASS=http://${CKAN_CONTAINER_NAME}:${CKAN_PORT_HOST}
ENV APACHE_CKAN_PROXY_PASS=http://${CKAN_CONTAINER_NAME}:${CKAN_PORT_HOST}
RUN mkdir -p ${APACHE_LOG_DIR}

View File

@ -225,8 +225,8 @@ Group www-data
#
<VirtualHost *:${APACHE_PORT}>
<Location ${APACHE_CKAN_LOCATION}>
ProxyPass ${APACHE_PROXY_PASS}
ProxyPassReverse ${APACHE_PROXY_PASS}
ProxyPass ${APACHE_CKAN_PROXY_PASS}
ProxyPassReverse ${APACHE_CKAN_PROXY_PASS}
</Location>
<Location ${APACHE_PYCSW_LOCATION}>

View File

@ -16,6 +16,11 @@ services:
- TZ=${TZ}
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
db:
condition: service_healthy
@ -43,6 +48,11 @@ services:
- DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=/var/lib/postgresql/data/db
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
volumes:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
@ -52,6 +62,11 @@ services:
solr:
container_name: ${SOLR_CONTAINER_NAME}
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
volumes:
- solr_data:/var/solr
restart: unless-stopped
@ -61,6 +76,11 @@ services:
redis:
container_name: ${REDIS_CONTAINER_NAME}
image: redis:${REDIS_VERSION}
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]

View File

@ -15,6 +15,11 @@ services:
dockerfile: Dockerfile
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
ckan:
condition: service_healthy
@ -27,9 +32,14 @@ services:
build:
context: ckan/
dockerfile: Dockerfile
image: ghcr.io/mjanez/ckan-spatial:master
image: ghcr.io/mjanez/ckan-spatial:ckan-2.9.8
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
db:
condition: service_healthy
@ -56,6 +66,11 @@ services:
- DATASTORE_READONLY_PASSWORD=${DATASTORE_READONLY_PASSWORD}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=/var/lib/postgresql/data/db
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
volumes:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
@ -70,6 +85,11 @@ services:
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
volumes:
- solr_data:/var/solr
restart: unless-stopped
@ -79,6 +99,11 @@ services:
redis:
container_name: ${REDIS_CONTAINER_NAME}
image: redis:${REDIS_VERSION}
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]

View File

@ -14,6 +14,11 @@ services:
dockerfile: Dockerfile
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
ckan:
condition: service_healthy
@ -26,9 +31,14 @@ services:
build:
context: ckan/
dockerfile: Dockerfile
image: ghcr.io/mjanez/ckan-spatial:master
image: ghcr.io/mjanez/ckan-spatial:ckan-2.9.8
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
db:
condition: service_healthy
@ -51,6 +61,11 @@ services:
dockerfile: Dockerfile
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
depends_on:
ckan:
condition: service_healthy
@ -76,6 +91,11 @@ services:
- PGDATA=/var/lib/postgresql/data/db
volumes:
- pg_data:/var/lib/postgresql/data
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "ckan"]
@ -88,6 +108,11 @@ services:
image: ckan/ckan-solr:${SOLR_IMAGE_VERSION}
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
volumes:
- solr_data:/var/solr
restart: unless-stopped
@ -97,6 +122,11 @@ services:
redis:
container_name: ${REDIS_CONTAINER_NAME}
image: redis:${REDIS_VERSION}
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-e", "QUIT"]