mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
have things working in docker-compose
This commit is contained in:
parent
34588912b1
commit
fd223635d3
@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
SCRIPT_PATH=$(realpath $0)
|
|
||||||
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
|
|
||||||
|
|
||||||
|
|
||||||
# DOCKER_BUILDKIT=0
|
|
||||||
# TODO this must be somehow defined as service within docker-compose and build order must be defined accordingly
|
|
||||||
#services:
|
|
||||||
# basething:
|
|
||||||
# image: unimportantlocalnameusedinfromstatement
|
|
||||||
# build:
|
|
||||||
# dockerfile: src/docker/baseimage
|
|
||||||
# target: production
|
|
||||||
# context: .
|
|
||||||
# command: sleep 60
|
|
||||||
# webapp:
|
|
||||||
# image: myimage/webapp:local-production
|
|
||||||
# depends_on:
|
|
||||||
# - basething
|
|
||||||
# build:
|
|
||||||
# dockerfile: src/docker/webapp.Dockerfile
|
|
||||||
# target: production
|
|
||||||
# context: .
|
|
||||||
|
|
||||||
# Webapp
|
|
||||||
docker build --target base -t "ocelotsocialnetwork/webapp:local-base" $SCRIPT_DIR/../webapp/
|
|
||||||
docker build --target code -t "ocelotsocialnetwork/webapp:local-code" $SCRIPT_DIR/../webapp/
|
|
||||||
# Backend
|
|
||||||
docker build --target base -t "ocelotsocialnetwork/backend:local-base" $SCRIPT_DIR/../backend/
|
|
||||||
docker build --target code -t "ocelotsocialnetwork/backend:local-code" $SCRIPT_DIR/../backend/
|
|
||||||
# Maintenance
|
|
||||||
docker build --target base -t "ocelotsocialnetwork/maintenance:local-base" $SCRIPT_DIR/../webapp/ -f $SCRIPT_DIR/../webapp/Dockerfile.maintenance
|
|
||||||
docker build --target code -t "ocelotsocialnetwork/maintenance:local-code" $SCRIPT_DIR/../webapp/ -f $SCRIPT_DIR/../webapp/Dockerfile.maintenance
|
|
||||||
@ -1,8 +1,19 @@
|
|||||||
# This docker-compose file is just here for testing
|
# This docker-compose file is just here for testing
|
||||||
|
|
||||||
version: "3.4"
|
version: "3.4"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
webapp-base:
|
||||||
|
image: ocelotsocialnetwork/webapp:local-base
|
||||||
|
build:
|
||||||
|
dockerfile: ../webapp/Dockerfile
|
||||||
|
context: ../webapp
|
||||||
|
target: base
|
||||||
|
|
||||||
|
webapp-code:
|
||||||
|
image: ocelotsocialnetwork/webapp:local-code
|
||||||
|
build:
|
||||||
|
dockerfile: ../webapp/Dockerfile
|
||||||
|
context: ../webapp
|
||||||
|
target: code
|
||||||
|
|
||||||
webapp:
|
webapp:
|
||||||
image: ocelotsocialnetwork/webapp-branded:local-production
|
image: ocelotsocialnetwork/webapp-branded:local-production
|
||||||
@ -20,6 +31,8 @@ services:
|
|||||||
- test-network
|
- test-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
- webapp-base
|
||||||
|
- webapp-code
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
@ -31,6 +44,20 @@ services:
|
|||||||
- INVITE_REGISTRATION=true
|
- INVITE_REGISTRATION=true
|
||||||
- CATEGORIES_ACTIVE=true
|
- CATEGORIES_ACTIVE=true
|
||||||
|
|
||||||
|
backend-base:
|
||||||
|
image: ocelotsocialnetwork/backend:local-base
|
||||||
|
build:
|
||||||
|
dockerfile: ../backend/Dockerfile
|
||||||
|
context: ../backend
|
||||||
|
target: base
|
||||||
|
|
||||||
|
backend-code:
|
||||||
|
image: ocelotsocialnetwork/backend:local-code
|
||||||
|
build:
|
||||||
|
dockerfile: ../backend/Dockerfile
|
||||||
|
context: ../backend
|
||||||
|
target: code
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: ocelotsocialnetwork/backend-branded:local-production
|
image: ocelotsocialnetwork/backend-branded:local-production
|
||||||
build:
|
build:
|
||||||
@ -45,6 +72,8 @@ services:
|
|||||||
- test-network
|
- test-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- neo4j
|
- neo4j
|
||||||
|
- backend-base
|
||||||
|
- backend-code
|
||||||
ports:
|
ports:
|
||||||
- 4000:4000
|
- 4000:4000
|
||||||
volumes:
|
volumes:
|
||||||
@ -68,6 +97,20 @@ services:
|
|||||||
- SMTP_PORT=25
|
- SMTP_PORT=25
|
||||||
- SMTP_IGNORE_TLS=true
|
- SMTP_IGNORE_TLS=true
|
||||||
|
|
||||||
|
maintenance-base:
|
||||||
|
image: ocelotsocialnetwork/maintenance:local-base
|
||||||
|
build:
|
||||||
|
dockerfile: ../webapp/Dockerfile.maintenance
|
||||||
|
context: ../webapp
|
||||||
|
target: base
|
||||||
|
|
||||||
|
maintenance-code:
|
||||||
|
image: ocelotsocialnetwork/maintenance:local-code
|
||||||
|
build:
|
||||||
|
dockerfile: ../webapp/Dockerfile.maintenance
|
||||||
|
context: ../webapp
|
||||||
|
target: code
|
||||||
|
|
||||||
maintenance:
|
maintenance:
|
||||||
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
|
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
|
||||||
image: ocelotsocialnetwork/maintenance-branded:local-production
|
image: ocelotsocialnetwork/maintenance-branded:local-production
|
||||||
@ -82,19 +125,14 @@ services:
|
|||||||
- APP_IMAGE_TAG_CODE=local-code
|
- APP_IMAGE_TAG_CODE=local-code
|
||||||
networks:
|
networks:
|
||||||
- test-network
|
- test-network
|
||||||
|
depends_on:
|
||||||
|
- maintenance-base
|
||||||
|
- maintenance-code
|
||||||
ports:
|
ports:
|
||||||
- 3001:80
|
- 3001:80
|
||||||
|
|
||||||
########################################################
|
|
||||||
# NEO4J ################################################
|
|
||||||
########################################################
|
|
||||||
neo4j:
|
neo4j:
|
||||||
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
|
image: ocelotsocialnetwork/neo4j-community:latest
|
||||||
image: ocelotsocialnetwork/neo4j-community-branded:local-production
|
|
||||||
build:
|
|
||||||
dockerfile: src/docker/neo4j.Dockerfile
|
|
||||||
target: community-branded
|
|
||||||
context: .
|
|
||||||
networks:
|
networks:
|
||||||
- test-network
|
- test-network
|
||||||
volumes:
|
volumes:
|
||||||
@ -106,9 +144,6 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 7687:7687
|
- 7687:7687
|
||||||
|
|
||||||
########################################################
|
|
||||||
# MAILSERVER TO FAKE SMTP ##############################
|
|
||||||
########################################################
|
|
||||||
mailserver:
|
mailserver:
|
||||||
image: djfarrelly/maildev
|
image: djfarrelly/maildev
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
ARG APP_IMAGE=ocelotsocialnetwork/neo4j-community
|
|
||||||
ARG APP_IMAGE_TAG=latest
|
|
||||||
ARG APP_IMAGE_COMMUNITY=${APP_IMAGE}:${APP_IMAGE_TAG}
|
|
||||||
|
|
||||||
##################################################################################
|
|
||||||
# COMMUNITY ######################################################################
|
|
||||||
##################################################################################
|
|
||||||
FROM $APP_IMAGE_COMMUNITY as community-branded
|
|
||||||
|
|
||||||
##################################################################################
|
|
||||||
# ENTERPRISE #####################################################################
|
|
||||||
##################################################################################
|
|
||||||
# Todo: refactor this with 'APP_IMAGE', 'APP_IMAGE_TAG', and similar to 'APP_IMAGE_COMMUNITY', Neo4j 'dockerfile' from main code
|
|
||||||
FROM ocelotsocialnetwork/neo4j-enterprise:latest as enterprise-branded
|
|
||||||
Loading…
x
Reference in New Issue
Block a user