Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/greendelta/lca-collaboration-server-docker
Docker file for building an image for the LCA Collaboration Server
https://github.com/greendelta/lca-collaboration-server-docker
Last synced: 7 days ago
JSON representation
Docker file for building an image for the LCA Collaboration Server
- Host: GitHub
- URL: https://github.com/greendelta/lca-collaboration-server-docker
- Owner: GreenDelta
- Created: 2023-08-18T12:23:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T13:37:54.000Z (19 days ago)
- Last Synced: 2024-12-06T14:42:25.192Z (19 days ago)
- Language: HCL
- Size: 58.6 KB
- Stars: 1
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Docker setup for the LCA Collaboration Server 2.3
This repository contains a setup for running the [LCA Collaboration Server 2.3](https://www.openlca.org/collaboration-server/) in a Docker container.
## Requirements
To run this setup, you need Docker and Docker Compose:
- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/)## Environement variables
The setup will use environment variables. These can be set in an `.env` file. The environement variables will be automatically loaded by the Docker Compose setup.
```bash
# Please fill in the following environment variables in this file
MYSQL_URL=lcacollab-db # the name of the MySQL container
MYSQL_PORT=3306
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_ROOT_PASSWORD=
OPENSEARCH_INITIAL_ADMIN_PASSWORD=
```## Running the LCA Collaboration Server with Docker compose
You can start the collaboration server by executing the following command:
```bash
cd lca-collaboration-server-docker
docker compose up
```If not done yet, this will build the image for the collaboration server and also fetch images for MySQL and OpenSearch. Then it starts containers for these images in interactive mode.
The setup will use two volumes (`db` and `server`) for storing data. These volumes are created if they do not exist yet:
```bash
$ docker volume ls
DRIVER VOLUME NAME
local lcacollab-db
local lcacollab-server
```The collaboration server will run on port `8080`, thus http://localhost:8080 will bring you to the login page of the collaboration server. The initial admin crendentials should be changed, see also the [configuration guide](https://www.openlca.org/lca-collaboration-server-2-0-configuration-guide/).
| Username | Password |
| --------------- | ------------------- |
| `administrator` | `Plea5eCh@ngeMe` |For using the search, you first need to enable it in the administration settings under `Enabled features: Search`. For the URL of the OpenSearch service, you need to set it to `http://search:9200`:
| Schema | Url | Port |
| ------ | ------------------------- | ----- |
| `http` | `lcacollab-search` # not localhost! | `9200`|## Running in read-only mode with external MySQL Server
To run the collaboration server in read-only mode, build the `lcacollab` image with the following command first:
```bash
docker build -t lcacollab .
```The MySQL Server parameters can be adapted in the `.env` file:
The container can be run with the following command (the MySQL server must be up and running) then:
```bash
docker compose -f compose.read-only.yaml up
```If you want to run the containers in background instead, just add the `-d` flag to the command.
The setup will use a single volume (`server`) for storing data. This volume is created if it does not exist yet:
```bash
$ docker volume ls
DRIVER VOLUME NAME
local lcacollab-server
```## Run a stand alone MySQL container
For testing purposes, a MySQL container with different host name and port can be run with the following command:
```bash
docker compose -f compose.mysql.yaml up
```The database schema is initialized at start.