Skip to content

Commit

Permalink
adjust docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitzmann committed Aug 29, 2023
1 parent dddeae9 commit 0f6aca9
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 2,467 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
/build
/html
node_modules
npm-debug.log
/.netlify
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
FROM nginx
COPY ./build /usr/share/nginx/html
FROM node:20-slim
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci
COPY . .
32 changes: 28 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
version: '3'
services:
web:
ofelia:
image: mcuadros/ofelia:latest
container_name: ofelia
depends_on:
- source
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
ofelia.job-run.awwesome.schedule: "@daily"
ofelia.job-run.awwesome.container: "awwesome"
ofelia.job-run.awwesome.command: "sh -c 'npm run build'"
source:
image: mkitzmann/awwesome
build: .
container_name: awwesome
restart: always
env_file:
- .env
working_dir: /usr/src/app
command: sh -c "npm run build"
volumes:
- shared_volume:/usr/src/app/html
web:
image: nginx
container_name: nginx
ports:
- "8080:80"
- "80:80"
volumes:
- shared_volume:/usr/share/nginx/html:ro
volumes:
shared_volume:

Loading

0 comments on commit 0f6aca9

Please sign in to comment.