Compare commits

..
Author SHA1 Message Date
marc 09f6858326 external true 2022-10-03 20:23:36 +02:00
marc 6d3fc1b774 bye 2022-10-03 20:21:49 +02:00
marc 326cce6fd8 image 2022-10-03 20:18:46 +02:00
marc 1f9a0b1bb9 var run docker 2022-10-03 20:16:31 +02:00
marc 4d6fe9941b dash 2022-10-03 19:45:44 +02:00
marc 418de3d52d fix conflict 2022-10-03 19:40:51 +02:00
marc b7c51c7f3c production 2022-09-21 16:48:27 +02:00
marc 6c60e3792c image names even though they point towards nothing 2022-09-20 16:11:03 +02:00
marc 140fb1d7d8 3.9 2022-09-20 15:44:48 +02:00
marc b54c69ae4c names are back 2022-09-20 15:18:09 +02:00
marc ce259181b9 mysql_testing 2022-09-20 14:38:33 +02:00
marc 77ca1911ed bind mount is back 2022-09-20 14:36:31 +02:00
marc 5e3dfec004 phpmyadmin might come in handy 2022-09-19 10:32:09 +02:00
marc b834f1d27b fix names 2022-09-19 10:27:59 +02:00
marc 3a374a10bc front too 2022-09-17 17:51:40 +02:00
marc 0378a0a224 front too 2022-09-16 19:54:08 +02:00
marc a6b9888cfe production 2022-09-16 19:06:08 +02:00
marc 8f69143715 3.9 2022-09-16 18:43:11 +02:00
9 changed files with 12966 additions and 9023 deletions
+58 -22
View File
@@ -1,42 +1,78 @@
version: '3'
version: "3.9"
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: numeris_phpmyadmin
restart: unless-stopped
ports:
- 3000:80
links:
- mysql:db
depends_on:
- mysql
container_name: numeris_phpmyadmin
networks:
- caddy
- mysql
labels:
caddy: phpmyadmin.numeris-isep.fr
caddy.reverse_proxy: "{{upstreams 80}}"
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: 'numeris'
container_name: numeris_mysql
restart: unless-stopped
networks:
- mysql
env_file:
- .env
volumes:
- ./var/mysql:/var/lib/mysql
container_name: numeris_mysql
back:
container_name: numeris_back
restart: unless-stopped
build:
context: ./back
dockerfile: Dockerfile.production
environment:
APP_ENV: production
APP_DEBUG: 'false'
DB_CONNECTION: mysql
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
ports:
- ${BACK_PORT}:80
links:
- mysql
networks:
- caddy
- mysql
env_file:
- .env
depends_on:
- mysql
container_name: numeris_back
front:
container_name: numeris_front
build:
context: ./front
dockerfile: Dockerfile
networks:
- caddy
depends_on:
- back
labels:
caddy: numeris-isep.fr
caddy.reverse_proxy: "{{upstreams 4200}}"
caddy:
image: lucaslorentz/caddy-docker-proxy:ci-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
# docker rootless daemon socket https://docs.docker.com/engine/security/rootless/
- /var/run/docker.sock:/var/run/docker.sock
- caddy_data:/data
networks:
- caddy
healthcheck:
test: ["CMD", "curl", "-f", "localhost:80"]
networks:
caddy:
external: true
mysql:
volumes:
mysql:
+29 -3
View File
@@ -1,14 +1,28 @@
version: '3'
version: "3.9"
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: numeris_phpmyadmin
ports:
- 3000:80
links:
- mysql:db
depends_on:
- mysql
volumes:
- ./var/mysql_testing:/var/lib/mysql
mysql:
image: mysql:5.7
container_name: numeris_mysql
environment:
MYSQL_DATABASE: 'numeris_testing'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
container_name: numeris_mysql
back:
image: numeris-back
container_name: numeris_back
build:
context: ./back
dockerfile: Dockerfile
@@ -25,4 +39,16 @@ services:
- mysql
depends_on:
- mysql
container_name: numeris_back
front:
image: numeris-front
container_name: numeris_front
build:
context: ./front
dockerfile: Dockerfile
ports:
- 4200:4200
links:
- back
depends_on:
- back
-1
View File
@@ -1,4 +1,3 @@
.DS_Store
node_modules/
dist/
Dockerfile
+16 -8
View File
@@ -1,10 +1,18 @@
FROM node:11.15.0 as builder
WORKDIR /opt/numeris
ENV PATH /opt/numeris/node_modules/.bin:$PATH
COPY package*.json /opt/numeris/
RUN npm ci
FROM node:11.15.0
RUN mkdir -p /home/numeris
ENV PATH /home/numeris/node_modules/.bin:$PATH
COPY package*.json /home/numeris/
# npm install
WORKDIR /home/numeris
RUN npm install
RUN npm install -g @angular/cli@7.3.9
COPY . .
COPY . /home/numeris
RUN npm rebuild node-sass
RUN npm run build
ENTRYPOINT [ "ng", "serve", "--configuration", "production", "--port", "80"]
WORKDIR /home/numeris
-17
View File
@@ -1,17 +0,0 @@
FROM node:11.15.0 as builder
WORKDIR /opt/numeris
ENV PATH /opt/numeris/node_modules/.bin:$PATH
COPY package.json /opt/numeris/
COPY yarn.lock /opt/numeris/
RUN yarn install
# RUN yarn add -g @angular/cli@7.3.9
COPY . .
RUN yarn run build-prod
ENTRYPOINT [ "ng", "serve", "--configuration", "production", "--port", "80" ]
FROM nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /opt/numeris/dist /usr/share/nginx/html
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]
-14
View File
@@ -1,14 +0,0 @@
server {
gzip on;
gzip_types text/plain text/css application/javascript;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
listen 80;
server_name 0.0.0.0;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
+12862
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -60,6 +60,6 @@
"protractor": "~5.4.2",
"ts-node": "~8.0.3",
"tslint": "~5.14.0",
"typescript": "3.1.1"
"typescript": "^3.2.4"
}
}
-8957
View File
File diff suppressed because it is too large Load Diff