diff --git a/.env.sample b/.env.sample index 580d4c7..9736834 100644 --- a/.env.sample +++ b/.env.sample @@ -19,9 +19,8 @@ EMAIL_BACKEND=console #SMTP_PASSWORD= #SMTP_HOST= #SMTP_USE_SLL= -#SMTP_USE_TLS=TRUE +#SMTP_USE_TLS=true #SMTP_PORT=587 -SECRET_DB_PASSWORD_VERSION=v1 SITE_URL=https://${DOMAIN} LETS_ENCRYPT_ENV=production diff --git a/README.md b/README.md index 1670090..987e557 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # karrot -Easily and securely send things from one computer to another +Karrot is a free and open-source tool for grassroots initiatives and groups of people that want to coordinate face-to-face activities on a local, autonomous and voluntary basis. * **Category**: Utilities * **Status**: 3, stable -* **Image**: [`karrot-backend`](),3, own -* **Healthcheck**: No +* **Image**: [`karrot-backend`](https://hub.docker.com/r/vlafvlaf/karrot_backend),4,upstream +* **Healthcheck**: Yes * **Backups**: No -* **Email**: No +* **Email**: Yes * **Tests**: No * **SSO**: No @@ -20,14 +20,10 @@ Easily and securely send things from one computer to another 1. Set up Docker Swarm and [`abra`] 2. `abra app new karrot` 3. `abra app config ` -3. `abra app secret generate -a ` 4. `abra app deploy ` -when deploying for the first time, the `web` service will end up in a weird state and the site will display `internal server error`. To fix this run -`abra app restart web` -this only needs to be done after first deploy - -also, mail isn't working for now, leave it at `console`! +## Configuration options +`MAXMIND_ACCOUNT_ID` and `MAXMIND_ACCOUNT_KEY` are API credentials from maxmind.com. You need an account there to get GeoIP data for Karrot. [`abra`]: https://git.coopcloud.tech/coop-cloud/abra diff --git a/backend/Dockerfile b/backend/Dockerfile deleted file mode 100644 index 74c8459..0000000 --- a/backend/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM python:3.7-buster - -WORKDIR /app - -RUN apt-get update && \ - apt-get install -y gdal-bin - -COPY ./karrot-backend.pyz /app/karrot-backend.pyz - -RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && \ - apt-get update && \ - apt-get install -y libmaxminddb0 libmaxminddb-dev geoipupdate - diff --git a/backend/backend.pyz b/backend/backend.pyz deleted file mode 100644 index 0a5025d..0000000 Binary files a/backend/backend.pyz and /dev/null differ diff --git a/backend/karrot-backend.pyz b/backend/karrot-backend.pyz deleted file mode 100644 index 6ee8779..0000000 Binary files a/backend/karrot-backend.pyz and /dev/null differ diff --git a/compose.yml b/compose.yml index a0739b8..79b0c76 100644 --- a/compose.yml +++ b/compose.yml @@ -2,7 +2,7 @@ version: "3.8" services: web: - image: "vlafvlaf/karrot_frontend:0.0.3" + image: "vlafvlaf/karrot_frontend:0.1.0" configs: - source: nginx_config target: /etc/nginx/conf.d/default.conf @@ -31,10 +31,9 @@ services: - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - - "coop-cloud.${STACK_NAME}.version=0.0.1+testing" app: - image: "vlafvlaf/karrot_backend:test" + image: "vlafvlaf/karrot_backend:0.1.0" networks: - internal depends_on: @@ -75,6 +74,9 @@ services: timeout: 3s retries: 2 start_period: 45s + deploy: + labels: + - "coop-cloud.${STACK_NAME}.version=0.1.0+0.1.0" command: > sh -c " echo 'EditionIDs GeoLite2-City GeoLite2-Country' > /etc/GeoIP.conf && @@ -87,7 +89,7 @@ services: python karrot-backend.pyz server " worker: - image: "vlafvlaf/karrot_backend:test" + image: "vlafvlaf/karrot_backend:0.1.0" depends_on: # shiv + geoip data gets loaded on the first run of the app # so to ensure it's available in the worker too, we need to wait @@ -149,10 +151,10 @@ services: - POSTGRES_DB=karrot -secrets: - db_password: - external: true - name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION} +#secrets: +# db_password: +# external: true +# name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION} configs: nginx_config: diff --git a/frontend/Dockerfile b/frontend/Dockerfile deleted file mode 100644 index 20d70b0..0000000 --- a/frontend/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM nginx:1.20.1-alpine - -RUN curl https://download.karrot.world/karrot-frontend-production.zip -o karrot-frontend.zip && \ - unzip -o karrot-frontend.zip -d /usr/share/nginx/html