Skip to content

Commit bd5c9c4

Browse files
April RiegerApril Rieger
April Rieger
authored and
April Rieger
committed
Updates and Dockerization
1 parent c23fb25 commit bd5c9c4

File tree

6 files changed

+4873
-1095
lines changed

6 files changed

+4873
-1095
lines changed

Dockerfile

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
# Use the official lightweight Node.js image.
2-
# https://hub.docker.com/_/node
3-
FROM node:alpine
1+
FROM node:18-buster as web
42

5-
# Set the working directory in the container
6-
WORKDIR /usr/src/app
73

8-
# Copy package.json and package-lock.json
9-
COPY package*.json ./
4+
USER node
5+
COPY --chown=node . /home/node/app
6+
WORKDIR /home/node/app
107

11-
# Install dependencies
12-
RUN npm install
8+
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/node/app/node_modules/.bin
139

14-
# Copy the rest of your app's source code from your host to your image filesystem.
15-
COPY . .
16-
17-
# Build the app
18-
RUN npm run build
10+
RUN bash -l -c " \
11+
npm install && \
12+
npm run clean && \
13+
npm run build"
1914

2015
# Inform Docker that the container is listening on the specified port at runtime.
2116
EXPOSE 8000
2217

2318
# Run the web service on container startup.
24-
CMD ["npm", "run", "serve"]
19+
CMD ["npm", "run", "serve"]

content/sections/contact/contact.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "April Rieger, Software Engineer",
33
"email": "[email protected]",
4-
"description": "Got a question, idea, or just want to talk tech? I'm all ears! Whether you're curious about my work, interested in collaboration, or in need of some tech insights, don't hesitate to drop me a line. ",
4+
"description": "Got a question, idea, or just want to talk tech? I'm all ears! Whether you're curious about my work, interested in collaborating, or in need of some tech insights, don't hesitate to drop me a line. ",
55
"image": {
66
"src": "../../images/a_rieger.png",
77
"alt": ""
88
},
99
"socialProfiles": {
10-
"from": ["LinkedIn", "Github"],
10+
"from": ["Github", "LinkedIn", "Mail" ],
1111
"showIcons": true
1212
}
1313
}

content/sections/hero/hero.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"description": "This is my Portfolio Site.",
1818
"socialProfiles": {
19-
"from": ["LinkedIn", "Github"],
19+
"from": ["Github", "LinkedIn", "Mail" ],
2020
"showIcons": true
2121
}
2222
}

docker-compose.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
1-
version: '3'
1+
version: '3.8'
2+
3+
x-app: &app
4+
build:
5+
context: .
6+
target: web
7+
image: aprilrieger/aprilrieger.github.io:${TAG:-latest}
8+
volumes:
9+
- .:/home/node/app
10+
- node:/home/node/app/node_modules
11+
# env_file:
12+
# - .env
13+
# - .env.development
14+
# Keep the stdin open, so we can attach to our app container's process
15+
# and do things such as byebug, etc:
16+
stdin_open: true
17+
# Enable sending signals (CTRL+C, CTRL+P + CTRL+Q) into the container:
18+
tty: true
19+
220
services:
321
web:
4-
build: .
22+
<<: *app
23+
command: npm run serve
24+
# command: tail -f /dev/null
25+
# environment:
26+
# - VIRTUAL_HOST=portfolio.test
27+
# - VIRTUAL_PORT=8000
528
ports:
6-
- "8000:8000"
7-
volumes:
8-
- .:/usr/src/app
9-
- /usr/src/app/node_modules
29+
- 8000:8000
30+
- 9000:9000
31+
volumes:
32+
node:

0 commit comments

Comments
 (0)