Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start all service including back and front when doing docker compose #546

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Clearer error message when adding a website
* Fix error in 'projects' tab from user page
- dockerise front and backend along all other services for development purpose

## 1.4.31 (2024-09-27)

Expand Down
11 changes: 11 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM quay.io/genouest/node:16.13-buster

WORKDIR /usr/src/app

COPY . .

RUN npm install

EXPOSE 3000

CMD ["node", "app.js"]
112 changes: 112 additions & 0 deletions dev_quickstart/docker-compose-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
version: '3'

services:

mysql:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=my
ports:
- "3306:3306"

mongo:
image: mongo
ports:
- "27017:27017"

redis:
#image: redis
image: quay.io/osallou/redis
ports:
- "6379:6379"

mailhog:
#image: mailhog/mailhog
image: quay.io/osallou/mailhog
ports:
- "8025:8025"

gomail-rabbitmq:
#image: rabbitmq
image: quay.io/osallou/rabbitmq
hostname: gomail-rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=gomail
- RABBITMQ_DEFAULT_PASS=gomail

gomail-web:
#image: osallou/gomail
image: quay.io/osallou/gomail
environment:
- RABBITMQ_URL=amqp://gomail:gomail@gomail-rabbitmq:5672/%2F
- GOMAIL_HREF=http://gomail-web:6643
- GOMAIL_SECRET=test
- GOMAIL_REDIS_HOST=redis
- [email protected]
- GOMAIL_LISTS=mytestlist
ports:
- "6643:6643"
depends_on:
- gomail-rabbitmq
- redis
command: gunicorn -c gunicorn_conf.py -b 0.0.0.0:6643 gomail.app:app

gomail-executor:
image: quay.io/osallou/gomail
depends_on:
- gomail-rabbitmq
environment:
- RABBITMQ_URL=amqp://gomail:gomail@gomail-rabbitmq:5672/%2F
- GOMAIL_MAIL_HOST=mailhog
- GOMAIL_MAIL_PORT=1025
- [email protected]
- GOMAIL_SECRET=test
command: bash -c "sleep 20 && python3 gomail/executor.py"

openldap:
#image: dinkel/openldap
image: quay.io/osallou/openldap
environment:
- "SLAPD_PASSWORD=my"
- "SLAPD_DOMAIN=my.org"
ports:
- "389:389"
volumes:
#- ${MYDIR}/openldap/data/etc:/etc/ldap
#- ${MYDIR}/openldap/data/lib:/var/lib/ldap
- ./ldap-data:/etc/ldap/prepopulate:ro
phpldapadmin:
#image: dinkel/phpldapadmin
image: quay.io/osallou/phpldapadmin
ports:
- "8080:80"
environment:
- LDAP_SERVER_HOST=openldap

node-backend:
build:
context: ../
dockerfile: Dockerfile.dev
depends_on:
- mongo
environment:
- MY_ADMIN_USER=admin
- MY_ADMIN_GROUP=admin
- [email protected]
- MY_ADMIN_PASSWORD=my
- MY_REDIS_HOST=redis
command: node app.js
ports:
- "3001:3000"
volumes:
- ../manager2/dist/my-ui:/usr/src/app/manager2/dist/my-ui #

angular-frontend:
build:
context: ../manager2
ports:
- "4200:4200"
volumes:
- ../manager2:/usr/src/app/manager2
- /usr/src/app/manager2/node_modules

14 changes: 14 additions & 0 deletions manager2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM quay.io/genouest/node:16.13-buster

RUN npm install -g @angular/[email protected]

WORKDIR /usr/src/app/manager2

COPY . .
RUN npm ci
RUN export NODE_OPTIONS=--openssl-legacy-provider
RUN export gomngr_auth=fake

EXPOSE 4200

CMD ["ng", "serve", "--base-href", "/manager2/", "--source-map", "--watch"]