Skip to content
Snippets Groups Projects
Commit 008a0b90 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

add docker compose

parent 4364dd76
Branches
No related tags found
2 merge requests!7feat: add front office,!5Https test
version: '3.7'
services:
nginx:
image: nginx:1.16
restart: unless-stopped
volumes:
- ./nginx/site.conf:/etc/nginx/conf.d/default.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
command: ["nginx", "-g", "daemon off;"]
ports:
- 8081:8080
networks:
backoffice:
depends_on:
- front
links:
- front
front:
image: bayesimpact/react-base
restart: unless-stopped
volumes:
- ./:/usr/app
working_dir: /usr/app
ports:
- 3000:3000
networks:
backoffice:
networks:
backoffice:
\ No newline at end of file
version: '3.7'
services:
nginx:
image: backoffice #TODO: replace with forge image tag
build:
context: .
restart: unless-stopped
ports:
- 8080:80
version: '3.7' version: '3.7'
services: services:
nginx: nginx:
image: nginx:1.16 image: test
restart: unless-stopped restart: unless-stopped
ports:
- 8080:8080
networks:
backoffice:
volumes: volumes:
- ./nginx/site.conf:/etc/nginx/conf.d/default.conf - ./nginx/site.conf:/etc/nginx/conf.d/default.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf - ./cert.pem:/etc/nginx/cert.pem
command: ["nginx", "-g", "daemon off;"] - ./key.pem:/etc/nginx/key.pem
database:
image: mysql:5
ports: ports:
- 8081:8080 - 3306:3306
networks: networks:
backoffice: backoffice:
depends_on: environment:
- front MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
links: MYSQL_DATABASE: ${DATABASE_NAME}
- front healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD
interval: 5s
timeout: 10s
retries: 60
front: backend:
image: bayesimpact/react-base image: registry.forge.grandlyon.com/web-et-numerique/llle_project/backoffice-server:test
networks:
backoffice:
depends_on:
database:
condition: service_healthy
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./:/usr/app - /etc/localtime:/etc/localtime:ro
working_dir: /usr/app - ./configs:/app/configs
- ./letsencrypt_cache:/app/letsencrypt_cache
- ./data:/app/data
ports: ports:
- 3000:3000 - ${HTTPS_PORT}:${HTTPS_PORT}
networks: - 8090:8090
backoffice: environment:
- HOSTNAME=${HOSTNAME}
- HTTPS_PORT=${HTTPS_PORT}
- ADMIN_ROLE=${ADMIN_ROLE}
- REDIRECT_URL=${REDIRECT_URL}
- CLIENT_ID=${CLIENT_ID}
- CLIENT_SECRET=${CLIENT_SECRET}
- AUTH_URL=${AUTH_URL}
- TOKEN_URL=${TOKEN_URL}
- USERINFO_URL=${USERINFO_URL}
- DEBUG_MODE=${DEBUG_MODE}
- DATABASE_USER=${DATABASE_USER}
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- DATABASE_HOST=database
networks: networks:
backoffice: backoffice:
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment