changed deployment
This commit is contained in:
parent
045f0b7cf2
commit
ea4e057b02
5 changed files with 16 additions and 7 deletions
|
|
@ -38,7 +38,7 @@ COPY docker/entrypoint.sh /usr/local/bin/go-guess-entrypoint
|
|||
|
||||
USER app
|
||||
EXPOSE 8080
|
||||
ENV ADDRESS=:8081 \
|
||||
ENV ADDRESS=:8080 \
|
||||
APP_ENV=production \
|
||||
FRONTEND_URL=http://localhost:8080
|
||||
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -54,13 +54,13 @@ migrate-down:
|
|||
$(GOOSE) -dir migrations postgres "host=localhost user=go_guess password=go_guess dbname=go_guess port=5432 sslmode=disable search_path=ypto" down
|
||||
|
||||
seed:
|
||||
cd backend && DATABASE_URL="$(DATABASE_URL)&search_path=nmbs,public" APP_ENV="$${APP_ENV:-development}" go run ./cmd/seed
|
||||
cd backend && DATABASE_URL="$(DATABASE_URL)&search_path=ypto,public" APP_ENV="$${APP_ENV:-development}" go run ./cmd/seed
|
||||
|
||||
backend:
|
||||
cd backend && DATABASE_URL="$(DATABASE_URL)" JWT_SECRET="$(JWT_SECRET)" go run ./cmd/api
|
||||
|
||||
frontend:
|
||||
cd frontend && npm run dev
|
||||
cd frontend && npm run dev --host
|
||||
|
||||
frontend-install:
|
||||
cd frontend && npm ci
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
INSERT INTO users (email, password_hash, display_name, role)
|
||||
VALUES ('interviewer@nmbs.local', crypt('admin123', gen_salt('bf')), 'Lead Interviewer', 'interviewer')
|
||||
VALUES ('interviewer@ypto.local', crypt('admin123', gen_salt('bf')), 'Lead Interviewer', 'interviewer')
|
||||
ON CONFLICT (email) DO UPDATE SET
|
||||
password_hash = EXCLUDED.password_hash,
|
||||
display_name = EXCLUDED.display_name,
|
||||
role = EXCLUDED.role;
|
||||
|
||||
INSERT INTO users (email, password_hash, display_name, role)
|
||||
VALUES ('co-interviewer@nmbs.local', crypt('admin123', gen_salt('bf')), 'Co-Interviewer', 'interviewer')
|
||||
VALUES ('co-interviewer@ypto.local', crypt('admin123', gen_salt('bf')), 'Co-Interviewer', 'interviewer')
|
||||
ON CONFLICT (email) DO UPDATE SET
|
||||
password_hash = EXCLUDED.password_hash,
|
||||
display_name = EXCLUDED.display_name,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ services:
|
|||
POSTGRES_DB: go_guess
|
||||
POSTGRES_USER: go_guess
|
||||
POSTGRES_PASSWORD: go_guess
|
||||
networks:
|
||||
- go_guess_network
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
volumes:
|
||||
|
|
@ -17,6 +19,8 @@ services:
|
|||
|
||||
rabbitmq:
|
||||
image: rabbitmq:4-management-alpine
|
||||
networks:
|
||||
- go_guess_network
|
||||
ports:
|
||||
- "${RABBITMQ_AMQP_PORT:-5672}:5672"
|
||||
- "${RABBITMQ_MANAGEMENT_PORT:-15672}:15672"
|
||||
|
|
@ -36,6 +40,8 @@ services:
|
|||
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/
|
||||
ports:
|
||||
- "${API_PORT:-8080}:8080"
|
||||
networks:
|
||||
- go_guess_network
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
|
@ -48,7 +54,10 @@ services:
|
|||
- "${WEB_PORT:-5173}:80"
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
networks:
|
||||
- go_guess_network
|
||||
networks:
|
||||
go_guess_network:
|
||||
volumes:
|
||||
postgres_data:
|
||||
postgres_data2:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ http {
|
|||
index index.html;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue