mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
adding my stuff for login_server and community_server
This commit is contained in:
parent
ed53ee7cf4
commit
46daa8fc8a
@ -1 +1 @@
|
|||||||
Subproject commit 9fa87aac2053af28c5efaf57148461d8a8c85195
|
Subproject commit 912c1f4d11f30bd5671c7e512fff02602c5d91b4
|
||||||
@ -1,48 +1,61 @@
|
|||||||
version: "3.4"
|
version: "3.4"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
########################################################
|
########################################################
|
||||||
# FRONTEND #############################################
|
# FRONTEND #############################################
|
||||||
########################################################
|
########################################################
|
||||||
frontend:
|
frontend:
|
||||||
image: gradido/frontend:development
|
image: gradido/frontend:development
|
||||||
build:
|
build:
|
||||||
target: development
|
target: development
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV="development"
|
- NODE_ENV="development"
|
||||||
# - DEBUG=true
|
# - DEBUG=true
|
||||||
- NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/`
|
- NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/`
|
||||||
volumes:
|
volumes:
|
||||||
# This makes sure the docker container has its own node modules.
|
# This makes sure the docker container has its own node modules.
|
||||||
# Therefore it is possible to have a different node version on the host machine
|
# Therefore it is possible to have a different node version on the host machine
|
||||||
- frontend_node_modules:/app/node_modules
|
- frontend_node_modules:/app/node_modules
|
||||||
# bind the local folder to the docker to allow live reload
|
# bind the local folder to the docker to allow live reload
|
||||||
- ./frontend:/app
|
- ./frontend:/app
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# BACKEND ##############################################
|
# BACKEND ##############################################
|
||||||
########################################################
|
########################################################
|
||||||
## login server
|
## login server
|
||||||
login-server:
|
login-server:
|
||||||
build:
|
build:
|
||||||
target: login_server_debug
|
context: ./login_server/
|
||||||
#backend:
|
target: login_server_debug
|
||||||
# image: ocelotsocialnetwork/backend:development
|
security_opt:
|
||||||
# build:
|
- seccomp:unconfined
|
||||||
# target: development
|
#cap-add:SYS_PTRACE
|
||||||
# environment:
|
depends_on:
|
||||||
# - NODE_ENV="development"
|
- mariadb
|
||||||
# - DEBUG=true
|
networks:
|
||||||
# volumes:
|
- internal-net
|
||||||
# # This makes sure the docker container has its own node modules.
|
ports:
|
||||||
# # Therefore it is possible to have a different node version on the host machine
|
- 1200:1200
|
||||||
# - backend_node_modules:/app/node_modules
|
- 1201:1201
|
||||||
# # bind the local folder to the docker to allow live reload
|
volumes:
|
||||||
# - ./backend:/app
|
- ./configs/login_server:/etc/grd_login
|
||||||
|
- ./logs:/var/log/grd_login
|
||||||
|
# image: ocelotsocialnetwork/backend:development
|
||||||
volumes:
|
# build:
|
||||||
frontend_node_modules:
|
# target: development
|
||||||
|
# environment:
|
||||||
|
# - NODE_ENV="development"
|
||||||
|
# - DEBUG=true
|
||||||
|
# volumes:
|
||||||
|
# # This makes sure the docker container has its own node modules.
|
||||||
|
# # Therefore it is possible to have a different node version on the host machine
|
||||||
|
# - backend_node_modules:/app/node_modules
|
||||||
|
# # bind the local folder to the docker to allow live reload
|
||||||
|
# - ./backend:/app
|
||||||
|
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
frontend_node_modules:
|
||||||
# backend_node_modules:
|
# backend_node_modules:
|
||||||
@ -1,123 +1,123 @@
|
|||||||
# This file defines the production settings. It is overwritten by docker-compose.override.yml,
|
# This file defines the production settings. It is overwritten by docker-compose.override.yml,
|
||||||
# which defines the development settings. The override.yml is loaded by default. Therefore it
|
# which defines the development settings. The override.yml is loaded by default. Therefore it
|
||||||
# is required to explicitly define if you want an production build:
|
# is required to explicitly define if you want an production build:
|
||||||
# > docker-compose -f docker-compose.yml up
|
# > docker-compose -f docker-compose.yml up
|
||||||
|
|
||||||
version: "3.4"
|
version: "3.4"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
########################################################
|
########################################################
|
||||||
# FRONTEND #############################################
|
# FRONTEND #############################################
|
||||||
########################################################
|
########################################################
|
||||||
frontend:
|
frontend:
|
||||||
image: gradido/frontend:latest
|
image: gradido/frontend:latest
|
||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
target: production
|
target: production
|
||||||
networks:
|
networks:
|
||||||
- external-net
|
- external-net
|
||||||
#depends_on:
|
#depends_on:
|
||||||
# - backend
|
# - backend
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
environment:
|
environment:
|
||||||
# Envs used in Dockerfile
|
# Envs used in Dockerfile
|
||||||
# - DOCKER_WORKDIR="/app"
|
# - DOCKER_WORKDIR="/app"
|
||||||
# - PORT="8080"
|
# - PORT="8080"
|
||||||
- BUILD_DATE
|
- BUILD_DATE
|
||||||
- BUILD_VERSION
|
- BUILD_VERSION
|
||||||
- BUILD_COMMIT
|
- BUILD_COMMIT
|
||||||
- NODE_ENV="production"
|
- NODE_ENV="production"
|
||||||
# Application only envs
|
# Application only envs
|
||||||
#- HOST=0.0.0.0 # This is nuxt specific, alternative value is HOST=webapp
|
#- HOST=0.0.0.0 # This is nuxt specific, alternative value is HOST=webapp
|
||||||
#env_file:
|
#env_file:
|
||||||
# - ./frontend/.env
|
# - ./frontend/.env
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
## BACKEND ##############################################
|
## BACKEND ##############################################
|
||||||
#########################################################
|
#########################################################
|
||||||
## mariadb
|
## mariadb
|
||||||
mariadb:
|
mariadb:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./mariadb/Dockerfile
|
dockerfile: ./mariadb/Dockerfile
|
||||||
target: mariadb_DIV
|
target: mariadb_server
|
||||||
environment:
|
environment:
|
||||||
- MARIADB_ALLOW_EMPTY_PASSWORD=1
|
- MARIADB_ALLOW_EMPTY_PASSWORD=1
|
||||||
- MARIADB_USER='root'
|
- MARIADB_USER='root'
|
||||||
- MARIADB_DATABASE='gradido_login'
|
- MARIADB_DATABASE='gradido_login'
|
||||||
networks:
|
networks:
|
||||||
- internal-net
|
- internal-net
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
volumes:
|
volumes:
|
||||||
- db_vol:/var/lib/mysql
|
- db_vol:/var/lib/mysql
|
||||||
|
|
||||||
## login server
|
## login server
|
||||||
login-server:
|
login-server:
|
||||||
build:
|
build:
|
||||||
context: ./login_server/
|
context: ./login_server/
|
||||||
target: login_server
|
target: login_server
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
networks:
|
networks:
|
||||||
- internal-net
|
- internal-net
|
||||||
ports:
|
ports:
|
||||||
- 1200:1200
|
- 1200:1200
|
||||||
- 1201:1201
|
- 1201:1201
|
||||||
volumes:
|
volumes:
|
||||||
- ./configs/login_server:/etc/grd_login
|
- ./configs/login_server:/etc/grd_login
|
||||||
|
|
||||||
## community server (cakephp with php-fpm and nginx)
|
## community server (cakephp with php-fpm and nginx)
|
||||||
community-server:
|
community-server:
|
||||||
build:
|
build:
|
||||||
context: ./community_server/
|
context: ./community_server/
|
||||||
environment:
|
environment:
|
||||||
- DB_PASSWORD=''
|
- DB_PASSWORD=''
|
||||||
- DB_USER='root'
|
- DB_USER='root'
|
||||||
- DB_DATABASE='gradido_community'
|
- DB_DATABASE='gradido_community'
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
networks:
|
networks:
|
||||||
- internal-net
|
- internal-net
|
||||||
- external-net
|
- external-net
|
||||||
|
|
||||||
#backend:
|
#backend:
|
||||||
# image: ocelotsocialnetwork/backend:latest
|
# image: ocelotsocialnetwork/backend:latest
|
||||||
# build:
|
# build:
|
||||||
# context: ./backend
|
# context: ./backend
|
||||||
# target: production
|
# target: production
|
||||||
# networks:
|
# networks:
|
||||||
# - external-net
|
# - external-net
|
||||||
# - internal-net
|
# - internal-net
|
||||||
# depends_on:
|
# depends_on:
|
||||||
# - neo4j
|
# - neo4j
|
||||||
# ports:
|
# ports:
|
||||||
# - 4000:4000
|
# - 4000:4000
|
||||||
# volumes:
|
# volumes:
|
||||||
# - backend_uploads:/app/public/uploads
|
# - backend_uploads:/app/public/uploads
|
||||||
# environment:
|
# environment:
|
||||||
# # Envs used in Dockerfile
|
# # Envs used in Dockerfile
|
||||||
# # - DOCKER_WORKDIR="/app"
|
# # - DOCKER_WORKDIR="/app"
|
||||||
# # - PORT="4000"
|
# # - PORT="4000"
|
||||||
# - BUILD_DATE
|
# - BUILD_DATE
|
||||||
# - BUILD_VERSION
|
# - BUILD_VERSION
|
||||||
# - BUILD_COMMIT
|
# - BUILD_COMMIT
|
||||||
# - NODE_ENV="production"
|
# - NODE_ENV="production"
|
||||||
# # Application only envs
|
# # Application only envs
|
||||||
# - DEBUG=false
|
# - DEBUG=false
|
||||||
# - NEO4J_URI=bolt://neo4j:7687
|
# - NEO4J_URI=bolt://neo4j:7687
|
||||||
# - GRAPHQL_URI=http://backend:4000
|
# - GRAPHQL_URI=http://backend:4000
|
||||||
# - CLIENT_URI=http://webapp:3000
|
# - CLIENT_URI=http://webapp:3000
|
||||||
# env_file:
|
# env_file:
|
||||||
# - ./backend/.env
|
# - ./backend/.env
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
external-net:
|
external-net:
|
||||||
internal-net:
|
internal-net:
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_vol:
|
db_vol:
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 75c672369f10423a916421c82eb987a8205a376c
|
Subproject commit fa936dbc80860472a5cbc3d877cf130a0be916b3
|
||||||
@ -1,74 +1,85 @@
|
|||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
# Build skeema
|
# Build skeema
|
||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
FROM golang:1.14.4 as skeema_build
|
FROM golang:1.14.4 as skeema_build
|
||||||
RUN go get -d -v github.com/skeema/skeema
|
RUN go get -d -v github.com/skeema/skeema
|
||||||
WORKDIR /go/src/github.com/skeema/skeema
|
WORKDIR /go/src/github.com/skeema/skeema
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/skeema .
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/skeema .
|
||||||
|
|
||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
# mariadb server
|
# mariadb server
|
||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
From mariadb/server:10.5 as mariadb_server
|
From mariadb/server:10.5 as mariadb_server
|
||||||
|
|
||||||
#ENV DOCKER_WORKDIR="/docker-entrypoint-initdb.d"
|
ENV DOCKER_WORKDIR="/docker-entrypoint-initdb.d"
|
||||||
ENV DOCKER_WORKDIR="/skeema"
|
#ENV DOCKER_WORKDIR="/skeema"
|
||||||
|
|
||||||
# copy skeema
|
# copy skeema
|
||||||
COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
#COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
||||||
|
|
||||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||||
WORKDIR ${DOCKER_WORKDIR}
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
#COPY ./mariadb/.skeema .
|
#COPY ./mariadb/.skeema .
|
||||||
COPY ./login_server/skeema/ .
|
#COPY ./login_server/skeema/ .
|
||||||
#COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
#COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
||||||
COPY ./community_server/skeema/ .
|
#COPY ./community_server/skeema/ .
|
||||||
|
#RUN for f in *.c; do cp -- "$f" "$OTHERDIR/old#$f"; done
|
||||||
|
|
||||||
|
# create databases
|
||||||
#USER mysql
|
COPY ./mariadb/setup_dbs.sql a_setup_dbs.sql
|
||||||
#VOLUME /var/lib/mysql
|
# login server db
|
||||||
#RUN mysqld
|
COPY ./login_server/skeema/ .
|
||||||
#RUN mysql -e 'CREATE DATABASE gradido_login_server;'
|
RUN cd ./gradido_login/ && for f in *.sql; do cp -- "$f" "../b_$f"; done
|
||||||
#RUN mysql -e 'CREATE DATABASE gradido_community_server;'
|
# community server db
|
||||||
|
COPY ./community_server/skeema/ .
|
||||||
|
RUN cd ./gradido_community/ && for f in *.sql; do cp -- "$f" "../c_$f"; done
|
||||||
#RUN skeema push
|
RUN cd ./gradido_community/insert && for f in *.sql; do cp -- "$f" "../../d_$f"; done
|
||||||
|
RUN ls -ls
|
||||||
#########################################################################################################
|
|
||||||
# mariadb server selfmade
|
|
||||||
#########################################################################################################
|
#USER mysql
|
||||||
From alpine:latest as mariadb_DIV
|
#VOLUME /var/lib/mysql
|
||||||
|
#RUN mysqld
|
||||||
ENV DOCKER_WORKDIR="/skeema"
|
#RUN mysql -e 'CREATE DATABASE gradido_login_server;'
|
||||||
|
#RUN mysql -e 'CREATE DATABASE gradido_community_server;'
|
||||||
|
|
||||||
|
|
||||||
#RUN apt-get update \
|
#RUN skeema push
|
||||||
# && apt-get -y --no-install-recommends install mariadb-server mariadb-client \
|
|
||||||
# && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
#########################################################################################################
|
||||||
RUN apk add mariadb mariadb-client
|
# mariadb server selfmade
|
||||||
|
#########################################################################################################
|
||||||
# copy skeema
|
From alpine:latest as mariadb_DIV
|
||||||
COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
|
||||||
|
ENV DOCKER_WORKDIR="/skeema"
|
||||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
|
||||||
WORKDIR ${DOCKER_WORKDIR}
|
#VOLUME /var/lib/mysql
|
||||||
|
|
||||||
COPY ./mariadb/setup_dbs.sh .
|
#RUN apt-get update \
|
||||||
COPY ./mariadb/.skeema .
|
# && apt-get -y --no-install-recommends install mariadb-server mariadb-client \
|
||||||
COPY ./login_server/skeema/ .
|
# && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||||
COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
RUN apk add mariadb mariadb-client
|
||||||
COPY ./community_server/skeema/ .
|
|
||||||
COPY ./mariadb/.skeema.community ./gradido_community/.skeema
|
# copy skeema
|
||||||
|
COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
||||||
USER mysql
|
|
||||||
#VOLUME /var/lib/mysql
|
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||||
RUN mysqld
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
RUN chmod +x ./setup_dbs.sh
|
|
||||||
RUN mysql < setup_dbs.sql
|
COPY ./mariadb/setup_dbs.sh .
|
||||||
RUN skeema push
|
COPY ./mariadb/.skeema .
|
||||||
|
COPY ./login_server/skeema/ .
|
||||||
EXPOSE 3306
|
COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
||||||
|
COPY ./community_server/skeema/ .
|
||||||
CMD ["mysld"]
|
COPY ./mariadb/.skeema.community ./gradido_community/.skeema
|
||||||
|
|
||||||
|
USER mysql
|
||||||
|
#VOLUME /var/lib/mysql
|
||||||
|
#RUN mysqld
|
||||||
|
#RUN chmod +x ./setup_dbs.sh
|
||||||
|
#RUN mysql < setup_dbs.sql
|
||||||
|
#RUN skeema push
|
||||||
|
|
||||||
|
#EXPOSE 3306
|
||||||
|
|
||||||
|
#CMD ["mysld"]
|
||||||
Loading…
x
Reference in New Issue
Block a user