diff --git a/docker/DOCKER_MORE_CLOSELY.md b/docker/DOCKER_MORE_CLOSELY.md deleted file mode 100644 index 113e3a4..0000000 --- a/docker/DOCKER_MORE_CLOSELY.md +++ /dev/null @@ -1,33 +0,0 @@ -# Docker - -## Apple M1 Platform - -***Attention:** For using Docker commands in Apple M1 environments!* - -```bash -# set env variable for your shell -$ export DOCKER_DEFAULT_PLATFORM=linux/amd64 -``` - -For even more informations, see [Docker More Closely](#docker-more-closely) - -### Docker Compose Override File For Apple M1 Platform - -For Docker compose `up` or `build` commands, you can use our Apple M1 override file that specifies the M1 platform: - -```bash -# in main folder - -# for production -$ docker compose -f docker-compose.yml -f docker-compose.apple-m1.override.yml up - -# for production testing Docker images from DockerHub -$ docker compose -f docker-compose.ocelotsocial-branded.yml -f docker-compose.apple-m1.override.yml up - -# only once: init admin user and create indexes and contraints in Neo4j database -$ docker compose exec backend /bin/sh -c "yarn prod:migrate init" -``` - -## Docker More Closely In Main Code - -To get more informations about the Apple M1 platform and to analyze the Docker builds etc. you find our documentation in our main code, [here](https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/DOCKER_MORE_CLOSELY.md). diff --git a/docker/backend.Dockerfile b/docker/backend.Dockerfile deleted file mode 100644 index 542632c..0000000 --- a/docker/backend.Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -ARG APP_IMAGE=ocelotsocialnetwork/backend -ARG APP_IMAGE_TAG_BASE=latest-base -ARG APP_IMAGE_TAG_CODE=latest-code -ARG APP_IMAGE_BASE=${APP_IMAGE}:${APP_IMAGE_TAG_BASE} -ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} - -################################################################################## -# CODE (branded) ################################################################# -################################################################################## -FROM $APP_IMAGE_CODE as code - -# copy public constants and email templates into the Docker image to brand it -COPY branding/constants/emails.js src/config/ -COPY branding/constants/logos.js src/config/ -COPY branding/constants/metadata.js src/config/ -COPY branding/email/ src/middleware/helpers/email/ - -################################################################################## -# BUILD ########################################################################## -################################################################################## -FROM code as build - -# yarn install -RUN yarn install --production=false --frozen-lockfile --non-interactive -# yarn build -RUN yarn run build - -################################################################################## -# BRANDED (Does contain only "binary"- and static-files to reduce image size) #### -################################################################################## -FROM $APP_IMAGE_BASE as branded - -# TODO - do all copying with one COPY command to have one layer -# Copy "binary"-files from build image -COPY --from=build ${DOCKER_WORKDIR}/dist ./dist -COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules -# TODO - externalize the uploads so we can copy the whole folder -COPY --from=build ${DOCKER_WORKDIR}/public/img/ ./public/img/ -COPY --from=build ${DOCKER_WORKDIR}/public/providers.json ./public/providers.json -# Copy package.json for script definitions (lock file should not be needed) -COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json - -# Run command -CMD /bin/sh -c "yarn run start" diff --git a/docker/maintenance.Dockerfile b/docker/maintenance.Dockerfile deleted file mode 100644 index e7771c5..0000000 --- a/docker/maintenance.Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -ARG APP_IMAGE=ocelotsocialnetwork/maintenance -ARG APP_IMAGE_TAG_BASE=latest-base -ARG APP_IMAGE_TAG_CODE=latest-code -ARG APP_IMAGE_BASE=${APP_IMAGE}:${APP_IMAGE_TAG_BASE} -ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} - -################################################################################## -# CODE (branded) ################################################################# -################################################################################## -FROM $APP_IMAGE_CODE as code - -# copy public constants into the Docker image to brand it -COPY branding/static/ static/ -COPY branding/constants/ constants/ -COPY branding/locales/ locales/ - -################################################################################## -# BUILD ########################################################################## -################################################################################## -FROM code as build - -# yarn install -## unnicely done in $APP_IMAGE_CODE at the moment, see main repo -# RUN yarn install --production=false --frozen-lockfile --non-interactive -# yarn generate -RUN yarn run generate - -################################################################################## -# BRANDED ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO #### -################################################################################## -# FROM $APP_IMAGE_BASE as branded -FROM nginx:alpine as branded - -COPY --from=build ./app/dist/ /usr/share/nginx/html/ -RUN rm /etc/nginx/conf.d/default.conf -COPY --from=code ./app/maintenance/nginx/custom.conf /etc/nginx/conf.d/ diff --git a/docker/neo4j.Dockerfile b/docker/neo4j.Dockerfile deleted file mode 100644 index eddc7be..0000000 --- a/docker/neo4j.Dockerfile +++ /dev/null @@ -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 diff --git a/docker/webapp.Dockerfile b/docker/webapp.Dockerfile deleted file mode 100644 index ba7cbff..0000000 --- a/docker/webapp.Dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -ARG APP_IMAGE=ocelotsocialnetwork/webapp -ARG APP_IMAGE_TAG_BASE=latest-base -ARG APP_IMAGE_TAG_CODE=latest-code -ARG APP_IMAGE_BASE=${APP_IMAGE}:${APP_IMAGE_TAG_BASE} -ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} - -################################################################################## -# CODE (branded) ################################################################# -################################################################################## -FROM $APP_IMAGE_CODE as code - -# copy public constants into the Docker image to brand it -COPY tools/ tools/ -COPY branding/static/ static/ -COPY branding/constants/ constants/ -COPY branding/locales/html/ locales/html/ -# COPY branding/locales/index.js locales/index.js -COPY branding/locales/*.json locales/tmp/ -COPY branding/assets/styles/imports/ assets/styles/imports/ - -RUN apk add --no-cache bash jq - -RUN tools/merge-locales.sh - -################################################################################## -# BUILD ########################################################################## -################################################################################## -FROM code as build - -# yarn install -RUN yarn install --production=false --frozen-lockfile --non-interactive -# yarn build -RUN yarn run build - -################################################################################## -# BRANDED (Does contain only "binary"- and static-files to reduce image size) #### -################################################################################## -FROM $APP_IMAGE_BASE as branded - -# TODO - do all copying with one COPY command to have one layer -# Copy "binary"-files from build image -COPY --from=build ${DOCKER_WORKDIR}/.nuxt ./.nuxt -COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules -COPY --from=build ${DOCKER_WORKDIR}/nuxt.config.js ./nuxt.config.js -# Copy static files -# TODO - this seems not be needed anymore for the new rebranding -# TODO - this should be one Folder containign all stuff needed to be copied -COPY --from=build ${DOCKER_WORKDIR}/config/ ./config/ -COPY --from=build ${DOCKER_WORKDIR}/constants ./constants -COPY --from=build ${DOCKER_WORKDIR}/static ./static -COPY --from=build ${DOCKER_WORKDIR}/locales ./locales -COPY --from=build ${DOCKER_WORKDIR}/assets/styles/imports ./assets/styles/imports -# Copy package.json for script definitions (lock file should not be needed) -COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json - -# Run command -CMD /bin/sh -c "yarn run start"