Fix docker compose setup and add redaktions app
This commit is contained in:
parent
ea4cbfee3f
commit
74e282a92b
6
backend/Dockerfile
Normal file
6
backend/Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FROM postgres:11.5
|
||||||
|
|
||||||
|
COPY ./sql/* /docker-entrypoint-initdb.d/
|
||||||
|
|
||||||
|
RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
|
||||||
|
ENV LANG de_DE.utf8
|
|
@ -1,10 +1,23 @@
|
||||||
version: '3.1'
|
version: '3.1'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
redaktion:
|
||||||
|
container_name: redaktion
|
||||||
|
build:
|
||||||
|
context: ./redaktions-app/
|
||||||
|
dockerfile: ./dev.Dockerfile
|
||||||
|
volumes:
|
||||||
|
- './redaktions-app:/app'
|
||||||
|
- '/redaktions-app/node_modules'
|
||||||
|
ports:
|
||||||
|
- '3001:3000'
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=development
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: candymat-postgres:11.5
|
image: candymat-postgres:11.5
|
||||||
build:
|
build:
|
||||||
dockerfile: ./Dockerfile.postgres
|
dockerfile: ./Dockerfile
|
||||||
context: ./backend/
|
context: ./backend/
|
||||||
env_file: ./backend/.env-backend
|
env_file: ./backend/.env-backend
|
||||||
ports:
|
ports:
|
||||||
|
@ -21,7 +34,7 @@ services:
|
||||||
env_file: ./backend/.env-backend
|
env_file: ./backend/.env-backend
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
command: ["postgraphile", "--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
command: ["--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
version: '3.1'
|
version: '3.1'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
redaktion:
|
||||||
|
container_name: redaktions-app
|
||||||
|
build:
|
||||||
|
context: ./redaktions-app/
|
||||||
|
dockerfile: ./prod.Dockerfile
|
||||||
|
ports:
|
||||||
|
- '80:80'
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: candymat-postgres:11.5
|
image: candymat-postgres:11.5
|
||||||
build:
|
build:
|
||||||
dockerfile: ./Dockerfile.postgres
|
dockerfile: ./Dockerfile
|
||||||
context: ./backend/
|
context: ./backend/
|
||||||
env_file: ./backend/.env-backend
|
env_file: ./backend/.env-backend
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -23,7 +31,7 @@ services:
|
||||||
env_file: ./backend/.env-backend
|
env_file: ./backend/.env-backend
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
command: ["postgraphile", "--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
command: ["--connection", $DATABASE_URL, "--host", "0.0.0.0", "--port", "5000", "--schema", "candymat_data", "--watch"]
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
1
redaktions-app/.dockerignore
Normal file
1
redaktions-app/.dockerignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
14
redaktions-app/dev.Dockerfile
Normal file
14
redaktions-app/dev.Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM node:12.2.0-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV PATH /app/node_modules/.bin:$PATH
|
||||||
|
|
||||||
|
COPY package.json /app/package.json
|
||||||
|
COPY src /app/src
|
||||||
|
COPY public /app/public
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
RUN npm install react-scripts@3.0.1 -g
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
9069
redaktions-app/package-lock.json
generated
9069
redaktions-app/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -3,17 +3,16 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"typescript": "^3.6.2",
|
||||||
"@material-ui/core": "^4.4.0",
|
"@material-ui/core": "^4.4.0",
|
||||||
"@material-ui/icons": "^4.2.1",
|
"@material-ui/icons": "^4.2.1",
|
||||||
"@types/jest": "24.0.18",
|
"@types/jest": "24.0.18",
|
||||||
"@types/node": "12.7.3",
|
"@types/node": "12.7.3",
|
||||||
"@types/react": "16.9.2",
|
"@types/react": "16.9.2",
|
||||||
"@types/react-dom": "16.9.0",
|
"@types/react-dom": "16.9.0",
|
||||||
"eslint": "^6.3.0",
|
|
||||||
"react": "^16.9.0",
|
"react": "^16.9.0",
|
||||||
"react-dom": "^16.9.0",
|
"react-dom": "^16.9.0",
|
||||||
"react-scripts": "3.1.1",
|
"react-scripts": "^3.3.1"
|
||||||
"typescript": "3.6.2"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
|
13
redaktions-app/prod.Dockerfile
Normal file
13
redaktions-app/prod.Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
FROM node:12.2.0-alpine as build
|
||||||
|
WORKDIR /app
|
||||||
|
ENV PATH /app/node_modules/.bin:$PATH
|
||||||
|
COPY package.json /app/package.json
|
||||||
|
RUN npm install
|
||||||
|
RUN npm install react-scripts@3.0.1 -g
|
||||||
|
COPY . /app
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM nginx:1.16.0-alpine
|
||||||
|
COPY --from=build /app/build /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
|
@ -6,7 +6,7 @@
|
||||||
"es6",
|
"es6",
|
||||||
"dom"
|
"dom"
|
||||||
],
|
],
|
||||||
"jsx": "react",
|
"jsx": "preserve",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
Loading…
Reference in a new issue