This commit is contained in:
Tobias Mattsson 2025-04-14 04:36:11 +00:00 committed by GitHub
commit 6661ce88a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 61 additions and 0 deletions

25
app/docker-compose.yml Normal file
View File

@ -0,0 +1,25 @@
services:
frontend:
image: node:18-alpine
command: sh -c "yarn install && yarn run dev"
ports:
- 3000:3000
working_dir: /app
volumes:
- ./:/app
environment:
MYSQL_HOST: backend
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_DB: todos
backend:
image: mysql:8.0
volumes:
- todo-mysql-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: todos
volumes:
todo-mysql-data:

21
app/docker_back.yml Normal file
View File

@ -0,0 +1,21 @@
version: '3'
services:
backend:
image: mysql:8.0
volumes:
- todo-mysql-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: todos
networks:
backend-network:
ipv4_address: 192.168.0.13
networks:
backend-network:
ipam:
config:
- subnet: 192.168.0.0/24
volumes:
todo-mysql-data:

15
app/docker_front.yml Normal file
View File

@ -0,0 +1,15 @@
version: '3'
services:
frontend:
image: node:18-alpine
command: sh -c "yarn install && yarn run dev"
ports:
- "80:3000"
working_dir: /app
volumes:
- ./:/app
environment:
MYSQL_HOST: 192.168.0.13
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_DB: todos

0
build.sh Executable file → Normal file
View File