Skip to content

Commit

Permalink
ADDED: docker compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
AleixMT committed Feb 29, 2024
1 parent ca4d57d commit b0e55a1
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: deploy

# Trigger event on every push / delete event, no matter the branch
# on: [push, delete]

# Trigger event on every push / delete event, only in master branch
on:
push:
branches:
- "master"
delete:
branches:
- "master"

jobs:
deploy:
needs: build
runs-on: [self-hosted]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Stop eChempad container
run: docker-compose down

- name: Force pulling of the images or they would not be updated
run: docker-compose pull

- name: restart eChempad container with new image, which will be automatically pulled
run: docker-compose up -d
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ Mkfile.old
dkms.conf

# own gitignore rules

# ingore docker-compose files donwloaded
docker-compose.yml*
shared
index.html*
.idea
.idea/
110 changes: 110 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Obtained from https://raw.githubusercontent.com/ptrxyz/chemotion/latest-release/docker-compose.yml

version: '3.9'
services:
db:
image: postgres:13
restart: unless-stopped
hostname: db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- chemotion_db:/var/lib/postgresql/data/
networks:
- chemotion

# This module contains Wine to make .exe files work in Linux.
# Antivirus may complain, so it is left commented out
# More about it in this issue: https://github.com/ComPlat/chemotion_ELN/issues/1331
#msconvert:
#image: ptrxyz/chemotion:msconvert-1.6.0
#restart: unless-stopped
#hostname: msconvert
#volumes:
#- spectra:/shared:rw
#networks:
#- chemotion

spectra:
image: ptrxyz/chemotion:spectra-1.6.0
restart: unless-stopped
hostname: spectra
volumes:
- spectra:/shared:rw
depends_on:
- msconvert
networks:
- chemotion
command: ["gunicorn", "--timeout", "600", "-w", "4", "-b", "0.0.0.0:4000", "server:app"]

worker:
image: ptrxyz/chemotion:eln-1.6.0
restart: unless-stopped
environment:
- CONFIG_ROLE=worker
- SECRET_KEY_BASE=pleasechangeme
depends_on:
- db
- eln
- spectra
volumes:
- chemotion_data:/chemotion/data/
- chemotion:/chemotion/app
networks:
- chemotion

eln:
image: ptrxyz/chemotion:eln-1.6.0
restart: unless-stopped
environment:
- CONFIG_ROLE=eln
- SECRET_KEY_BASE=pleasechangeme
depends_on:
- db
- spectra
volumes:
- ./shared/pullin:/shared
- ./shared/backup:/backup
- chemotion_data:/chemotion/data/
- chemotion:/chemotion/app
ports:
- 4000:4000
networks:
- chemotion

ketchersvc:
image: ptrxyz/chemotion:ketchersvc-1.6.0
restart: unless-stopped
environment:
- CONFIG_KETCHER_URL=http://eln:4000/ketcher/
init: true
depends_on:
eln:
condition: service_healthy
networks:
- chemotion

converter:
image: ptrxyz/chemotion:converter-1.6.0
restart: unless-stopped
environment:
- SECRET_KEY=imsupersecretandwanttobechanged
volumes:
- ./services/converter/profiles:/srv/chemotion/profiles
- ./services/converter/datasets:/srv/chemotion/datasets
networks:
- chemotion

volumes:
chemotion:
name: chemotion_app
chemotion_data:
name: chemotion_data
chemotion_db:
name: chemotion_db
spectra:
name: chemotion_spectra

networks:
chemotion:

0 comments on commit b0e55a1

Please sign in to comment.