Upload files to "z1"
This commit is contained in:
commit
e5b5daad52
BIN
z1/.gitkeep
Normal file
BIN
z1/.gitkeep
Normal file
Binary file not shown.
40
z1/docker-compose.yml
Normal file
40
z1/docker-compose.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
image: nginx:latest
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
volumes:
|
||||||
|
- ./frontend:/usr/share/nginx/html
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
backend:
|
||||||
|
build: ./backend
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:15
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: user
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
POSTGRES_DB: mydb
|
||||||
|
volumes:
|
||||||
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
adminer:
|
||||||
|
image: adminer
|
||||||
|
ports:
|
||||||
|
- "8081:8080"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
pgdata:
|
||||||
4
z1/init.sql
Normal file
4
z1/init.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS names (
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
name TEXT
|
||||||
|
);
|
||||||
4
z1/prepare-app.sh
Normal file
4
z1/prepare-app.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker compose build
|
||||||
|
docker volume create pgdata
|
||||||
|
echo "Prepared!"
|
||||||
4
z1/remove-app.sh
Normal file
4
z1/remove-app.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker compose down -v
|
||||||
|
docker volume rm pgdata 2>/dev/null
|
||||||
|
echo "Removed everything"
|
||||||
3
z1/start-app.sh
Normal file
3
z1/start-app.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker compose up -d
|
||||||
|
echo "Running at http://localhost:8080"
|
||||||
3
z1/stop-app.sh
Normal file
3
z1/stop-app.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker compose down
|
||||||
|
echo "Stopped"
|
||||||
Loading…
Reference in New Issue
Block a user